Correct a bug in the ASN.1 decoder which was introduced with the

recent OpenSSL update.

Obtained from:	OpenSSL CVS
This commit is contained in:
Jacques Vidrine 2002-08-05 16:25:17 +00:00
parent 4f20a5a274
commit b1357e1cec

View File

@ -124,7 +124,7 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
(int)(omax+ *pp));
#endif
if (*plength > (omax - (*pp - p)))
if (*plength > (omax - (p - *pp)))
{
ASN1err(ASN1_F_ASN1_GET_OBJECT,ASN1_R_TOO_LONG);
/* Set this so that even if things are not long enough