projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b197257
)
Sanity check an ASN1_object_size result
author
Matt Caswell
<matt@openssl.org>
Mon, 22 Aug 2016 22:41:15 +0000
(23:41 +0100)
committer
Matt Caswell
<matt@openssl.org>
Mon, 22 Aug 2016 23:19:15 +0000
(
00:19
+0100)
If it's negative don't try and malloc it.
Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/objects/obj_dat.c
patch
|
blob
|
history
diff --git
a/crypto/objects/obj_dat.c
b/crypto/objects/obj_dat.c
index bb50f63c0aaf4f62666c19d133e23ca7709aa5cf..259851bc00960a86b3201da8d1c7504e36ace5ff 100644
(file)
--- a/
crypto/objects/obj_dat.c
+++ b/
crypto/objects/obj_dat.c
@@
-373,6
+373,8
@@
ASN1_OBJECT *OBJ_txt2obj(const char *s, int no_name)
}
/* Work out total size */
j = ASN1_object_size(0, i, V_ASN1_OBJECT);
+ if (j < 0)
+ return NULL;
if ((buf = OPENSSL_malloc(j)) == NULL)
return NULL;