Call of memcmp with null pointers in obj_cmp()
[openssl.git] / crypto / objects / obj_dat.c
index 5cd755d77d63bd83cb51131f55956127d4064472..5ff1294d3c45f26063b7a47d6783c897dca76e3a 100644 (file)
@@ -400,6 +400,8 @@ static int obj_cmp(const ASN1_OBJECT *const *ap, const unsigned int *bp)
     j = (a->length - b->length);
     if (j)
         return (j);
+    if (a->length == 0)
+        return 0;
     return (memcmp(a->data, b->data, a->length));
 }