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:
62bfff2
)
RT3670: Check return from BUF_MEM_grow_clean
author
Graeme Perrow
<graeme.perrow@sap.com>
Thu, 12 Feb 2015 18:00:42 +0000
(13:00 -0500)
committer
Rich Salz
<rsalz@openssl.org>
Thu, 12 Feb 2015 18:01:33 +0000
(13:01 -0500)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit
b0333e697c008d639c56f48e9148cb8cba957e32
)
crypto/conf/conf_def.c
patch
|
blob
|
history
diff --git
a/crypto/conf/conf_def.c
b/crypto/conf/conf_def.c
index e3ffeb21ef4a3ed82c0b3053724b13dbc4598308..faca9aeb571b9dc9cb208415a0c24e3bac89015c 100644
(file)
--- a/
crypto/conf/conf_def.c
+++ b/
crypto/conf/conf_def.c
@@
-585,7
+585,11
@@
static int str_copy(CONF *conf, char *section, char **pto, char *from)
CONFerr(CONF_F_STR_COPY, CONF_R_VARIABLE_HAS_NO_VALUE);
goto err;
}
- BUF_MEM_grow_clean(buf, (strlen(p) + buf->length - (e - from)));
+ if (!BUF_MEM_grow_clean(buf,
+ (strlen(p) + buf->length - (e - from)))) {
+ CONFerr(CONF_F_STR_COPY, ERR_R_MALLOC_FAILURE);
+ goto err;
+ }
while (*p)
buf->data[to++] = *(p++);