summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3
diff options
context:
space:
mode:
authorKurt Cancemi <kurt@x64architecture.com>2015-05-07 16:12:33 -0400
committerMatt Caswell <matt@openssl.org>2015-05-11 12:15:28 +0100
commit344c271eb339fc2982e9a3584a94e51112d84584 (patch)
tree338a0262a2537f7bab1139a70d4fd7f61c3d0ed9 /crypto/x509v3
parent7786005d0d30816fd3cd3ee4bad11bf520b1327a (diff)
Add missing NULL check in X509V3_parse_list()
Matt's note: I added a call to X509V3err to Kurt's original patch. RT#3840 Signed-off-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509v3')
-rw-r--r--crypto/x509v3/v3_utl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c
index debd8078ca..c6aab4b95d 100644
--- a/crypto/x509v3/v3_utl.c
+++ b/crypto/x509v3/v3_utl.c
@@ -286,6 +286,10 @@ STACK_OF(CONF_VALUE) *X509V3_parse_list(const char *line)
int state;
/* We are going to modify the line so copy it first */
linebuf = BUF_strdup(line);
+ if (linebuf == NULL) {
+ X509V3err(X509V3_F_X509V3_PARSE_LIST, ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
state = HDR_NAME;
ntmp = NULL;
/* Go through all characters */