From 60adbfdea1ee754341d64454274e7aa83bae8971 Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 30 Sep 2011 08:40:25 +0200 Subject: Upgraded to openssl-1.0.0e --- openssl/crypto/asn1/a_object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openssl/crypto/asn1/a_object.c') diff --git a/openssl/crypto/asn1/a_object.c b/openssl/crypto/asn1/a_object.c index e5fbe7cbb..3978c9150 100644 --- a/openssl/crypto/asn1/a_object.c +++ b/openssl/crypto/asn1/a_object.c @@ -139,7 +139,7 @@ int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num) ASN1err(ASN1_F_A2D_ASN1_OBJECT,ASN1_R_INVALID_DIGIT); goto err; } - if (!use_bn && l > (ULONG_MAX / 10L)) + if (!use_bn && l >= ((ULONG_MAX - 80) / 10L)) { use_bn = 1; if (!bl) @@ -293,7 +293,7 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp, /* Sanity check OID encoding: can't have leading 0x80 in * subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp + 1; i < len - 1; i++, p++) + for (i = 0, p = *pp; i < len; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { -- cgit v1.2.3