On Wed, Jan 16, 2008 at 05:33:13PM -0600, [EMAIL PROTECTED] wrote:

> So this is from 0.9.8g's pem.h:
> 
> #define   PEM_read_SSL_SESSION(fp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read( \
> (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,(char **)x,cb,u)
> 
> And so is this:
> 
> void *  PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
> pem_password_cb *cb, void *u);
> 
> Anyone notice a problem here?
> 
> That first argument to PEM_ASN1_read will never, ever be the right type.
> 
> char * != void *
> 

No actual problem, in ANSI C pointers can be freely converted between
(type *) and (void *) and back.

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to