projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Call of memcmp with null pointers in obj_cmp()
[openssl.git]
/
crypto
/
objects
/
obj_dat.c
diff --git
a/crypto/objects/obj_dat.c
b/crypto/objects/obj_dat.c
index 3df7ff2457d4be132e64892385c29da64bb5c14c..6a068eef436a10e033c184db80cdef2dd97441fe 100644
(file)
--- a/
crypto/objects/obj_dat.c
+++ b/
crypto/objects/obj_dat.c
@@
-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));
}