That makes perfectly good sense to me. But if that is the case, how does the
extensions section get freed when the regular section does not?

Could this be something to do with multi-threading? The program where this
crashes is multi-threaded, and I've added callbacks to handle
multi-threading per the OpenSSL documentation. 

-Kenny 

-----Original Message-----
From: Kyle Hamilton [mailto:[email protected]] 
Sent: Friday, July 08, 2011 12:24 PM
To: [email protected]
Cc: [email protected]; [email protected]; Cason, Kenny
Subject: Re: Extracting X509 Policies that are searchable



On Wed, Jul 6, 2011 at 12:38 PM, Cason, Kenny <[email protected]>
wrote:
> Hi Patrick, thanks for your response.
>
>
> 1.   int i, j;
>
> 2.   X509_CINF *ci;
>
> 3.   ci=X509cert->cert_info;
>
> 4.   STACK_OF(X509_EXTENSION) *exts;

4.5: if(ci != NULL && ci->extensions != NULL) 

> 5.   exts = ci->extensions;

Crashing on #5 would be because of an invalid memory access on ci.  If it's
not NULL, then it's a block that's already been freed and the pointer's left
dangling.

-Kyle H

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to