[Openswan dev] openswan-2.6.13: use of unset pointer variables

D. Hugh Redelmeier hugh at mimosa.com
Sun May 18 00:34:08 EDT 2008


I'm not being too careful, so I may be wrong.  I've just bean glancing at 
the code.


In programs/pluto/spdb_print.c function print_sa_attr_oakley the variable 
"en" may not be initialized when it is used.

The obvious fix is to initialize it to NULL in its declaration.

The same bug appears in print_sa_attr_ipsec.

The same bug appears in print_sa_v2_trans.

print_sa_v2_attr looks like it should be fixed up so that it can have
the bug :-).  But I haven't looked at it carefully.

I've not compiled the code but I would have thought that gcc, with
appropriate flags, would have warned about these bugs.  Am I wrong?

Are other gcc-diagnosable problems being ignored?  Are more -W flags 
needed?


More information about the Dev mailing list