Ben Laurie <[EMAIL PROTECTED]> writes:

[Please keep me on the Cc:, since I'm not subscribed to openssl-dev.  Thanks.]

> This patch removes typesafety by using casts with gay abandon. Why is 
> this necessary? More to the point, IMO it should not be necessary. I'm 
> not keen on introducing a patch with so many casts in it.

I've just explained the need for this in a reply to Richard.  If you see
any way around this, I'm more than happy to implement it.

> I'm also slightly puzzled by this:

> > @@ -193,7 +193,7 @@ STACK *d2i_ASN1_SET(STACK **a, unsigned 
> >             char *s;
> >  
> >             if (M_ASN1_D2I_end_sequence()) break;
> > -           if ((s=func(NULL,&c.p,c.slen,c.max-c.p)) == NULL)
> > +           if ((s=func(NULL,&c.p,c.slen)) == NULL)
> 
> Why has an argument gone?

I thought I had explained this above: 

> > Most of this stuff should be obvious, with two exceptions where this effort
> > pointed out real errors, so this patch clearly has it's merrits:
> > 
> > * In crypto/pem/pem_lib.c (PEM_ASN1_read_bio), the d2i function argument is
> >   called with four arguments in one place, but with only three (as the
> >   prototype suggests) in another.  Removing the last argument in the first
> >   two calls allowed the testsuite to complete successfully, but the types
> >   don't match the prototype, so this is clearly wrong.  Someone really
> >   familiar with this code needs to have a look.
> > 
> > * The other mismatch occurs in crypto/asn1/a_set.c (d2i_ASN1_SET) where d2i
> >   is called with a superfluous fourth argument.

All the d2i functions take only three arguments, so there must be something
wrong here if it is called with 4 args in this one place.  The other change
above (to PEM_ASN1_read_bio) is almost certainly wrong, but something is
clearly wrong there as well.  This is the type of stuff you can catch with
the full prototyping I implemented.

        Rainer
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to