aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/a_object.c
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2010-04-01 12:25:40 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2010-04-01 12:25:40 +0000
commit0cedaa6c89235ed396068f2ebf546c9a909439e1 (patch)
treeea91d9b180fa36b1886b046a286630c089f57475 /crypto/asn1/a_object.c
parentf7a1b4761cf3f798e1b42d703d38221b47ce1eec (diff)
downloadsrc-0cedaa6c89235ed396068f2ebf546c9a909439e1.tar.gz
src-0cedaa6c89235ed396068f2ebf546c9a909439e1.zip
Import OpenSSL 0.9.8n.vendor/openssl/0.9.8n
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=206035 svn path=/vendor-crypto/openssl/0.9.8n/; revision=206037; tag=vendor/openssl/0.9.8n
Diffstat (limited to 'crypto/asn1/a_object.c')
-rw-r--r--crypto/asn1/a_object.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/asn1/a_object.c b/crypto/asn1/a_object.c
index d169f8c14736..365e4673a95c 100644
--- a/crypto/asn1/a_object.c
+++ b/crypto/asn1/a_object.c
@@ -291,12 +291,12 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
ASN1_OBJECT *ret=NULL;
const unsigned char *p;
int i;
- /* Sanity check OID encoding: can't have 0x80 in subidentifiers, see:
- * X.690 8.19.2
+ /* 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++)
{
- if (*p == 0x80)
+ if (*p == 0x80 && (!i || !(p[-1] & 0x80)))
{
ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING);
return NULL;