diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-09-30 15:19:39 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-09-30 15:19:39 +0000 |
commit | e95d806f05388fc0e63312c6b5c3ce17429da956 (patch) | |
tree | acee8c3db5c76fcd0da18c5af7afc6dfbd4f33b5 /lib/libcrypto/asn1/asn1_lib.c | |
parent | 4b1063654e6e7e3a547924640d3525e5b0131298 (diff) |
security fix from http://www.openssl.org/news/secadv_20030930.txt
see also http://cvs.openssl.org/chngview?cn=11471
Diffstat (limited to 'lib/libcrypto/asn1/asn1_lib.c')
-rw-r--r-- | lib/libcrypto/asn1/asn1_lib.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libcrypto/asn1/asn1_lib.c b/lib/libcrypto/asn1/asn1_lib.c index 60f36bb9582..aed28954006 100644 --- a/lib/libcrypto/asn1/asn1_lib.c +++ b/lib/libcrypto/asn1/asn1_lib.c @@ -104,10 +104,12 @@ int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass, l<<=7L; l|= *(p++)&0x7f; if (--max == 0) goto err; + if (l > (INT_MAX >> 7L)) goto err; } l<<=7L; l|= *(p++)&0x7f; tag=(int)l; + if (--max == 0) goto err; } else { |