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

Kurt Garloff garloff at suse.de
Wed Apr 21 12:00:37 CEST 2004


On Tue, Apr 20, 2004 at 10:09:19AM +0200, Andreas Steffen wrote:
> In openswan-2 the header file certs.h defines
> 
>   #define CRL_PATH	  plutopaths.crls.path

Is it a pointer char* ?
Then sizeof will happily report 4 (32bit archs) or 8 (64bit), which is
most likely not your intention.

> I don't know if sizeof(CRL_PATH) will still give the correct result
> because the content of plutopaths.crls.path is assigned dynamically in log.c
> during runtime. Probably a safer approach would be
> 
> -		    crl_uri.len = 7 + sizeof(CRL_PATH) + strlen(filename);
> +		    crl_uri.len = 8 + strlen(CRL_PATH) + strlen(filename);

Regards,
-- 
Kurt Garloff                   <kurt at garloff.de>             [Koeln, DE]
Physics:Plasma modeling <garloff at plasimo.phys.tue.nl> [TU Eindhoven, NL]
Linux: SUSE Labs (Head)        <garloff at suse.de>    [SUSE Nuernberg, DE]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.openswan.org/pipermail/dev/attachments/20040421/c9d3d852/attachment.bin


More information about the Dev mailing list