projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6983d0
)
do_othername: check for NULL after allocating objtmp
author
Jonas Maebe
<jonas.maebe@elis.ugent.be>
Sun, 8 Dec 2013 21:47:10 +0000
(22:47 +0100)
committer
Kurt Roeckx
<kurt@roeckx.be>
Sun, 17 Aug 2014 16:56:05 +0000
(18:56 +0200)
Signed-off-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/x509v3/v3_alt.c
patch
|
blob
|
history
diff --git
a/crypto/x509v3/v3_alt.c
b/crypto/x509v3/v3_alt.c
index d29d94338ec506b77d2f0fde904a50b89551368c..ea1410dd74e3fa202d1a25f1e58af05e11c66a6c 100644
(file)
--- a/
crypto/x509v3/v3_alt.c
+++ b/
crypto/x509v3/v3_alt.c
@@
-579,6
+579,8
@@
static int do_othername(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx)
return 0;
objlen = p - value;
objtmp = OPENSSL_malloc(objlen + 1);
+ if (objtmp == NULL)
+ return 0;
strncpy(objtmp, value, objlen);
objtmp[objlen] = 0;
gen->d.otherName->type_id = OBJ_txt2obj(objtmp, 0);