Call of memcmp with null pointers in obj_cmp()
[openssl.git] / crypto / objects / obj_dat.c
index 3df7ff2457d4be132e64892385c29da64bb5c14c..6a068eef436a10e033c184db80cdef2dd97441fe 100644 (file)
@@ -380,6 +380,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));
 }