[Openswan dev] Re: PATCH: X.509 Off by one bug in crl processing (aka crl.pem crash bug)

Herbert Xu herbert at gondor.apana.org.au
Wed Apr 21 20:39:59 CEST 2004

Andreas Steffen <andreas.steffen at strongsec.com> wrote:
> The X.509 patches and strongSwan never experienced theses crashes
> because CRL_PATH remained a string constant the size of which can
> be determined using sizeof() during compile time.

Any recent version of gcc should optimise strlen("foo") to 3.  So
there is no reason to use sizeof on a string constant anymore.

>>>-                 crl_uri.len = 7 + sizeof(CRL_PATH) + strlen(filename);
>>>+                 crl_uri.len = 8 + strlen(CRL_PATH) + strlen(filename);

Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

More information about the Dev mailing list