[openssl-users] i2d_X509_SIG() in FIPS mode
    Dr. Stephen Henson 
    steve at openssl.org
       
    Mon Feb  2 15:57:59 UTC 2015
    
    
  
On Mon, Feb 02, 2015, Gayathri Manoj wrote:
> Hi Steve,
> 
> unsigned char *ptr, *tmp=NULL;
>  X509_SIG sig;
> ....
> len=i2d_X509_SIG(sig,NULL);
> tmp = (unsigned char*) malloc(513);
> ptr=tmp;
> i2d_X509_SIG(&sig, &ptr);  // here causing problem.
> 
Well you should really malloc 'len' bytes as it could theoretically exceed
513 (in practice it's unlikely).
How are you setting up "sig"?
Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
    
    
More information about the openssl-users
mailing list