aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_object.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2012-06-27 16:44:58 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2012-06-27 16:44:58 +0000
commit2b8b5455829304396e38200c205612c4dc57c052 (patch)
treecc5cd6657453d80b7eafb3ba5cc4ef4fd66c176f /crypto/asn1/a_object.c
parentfd3744ddb062b70bb370acec340acbac23f0bd98 (diff)
downloadsrc-2b8b5455829304396e38200c205612c4dc57c052.tar.gz
src-2b8b5455829304396e38200c205612c4dc57c052.zip
Import OpenSSL 0.9.8x.vendor/openssl/0.9.8x
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=237653 svn path=/vendor-crypto/openssl/0.9.8x/; revision=237654; tag=vendor/openssl/0.9.8x
Diffstat (limited to 'crypto/asn1/a_object.c')
-rw-r--r--crypto/asn1/a_object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c
index 365e4673a95c..3ac2bc2a01a1 100644
--- a/crypto/asn1/a_object.c
+++ b/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)
@@ -294,7 +294,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)))
{