RT3670: Check return from BUF_MEM_grow_clean
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit b0333e697c
)
This commit is contained in:
parent
a1331af032
commit
bb14c2c9ca
1 changed files with 5 additions and 1 deletions
|
@ -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++);
|
||||
|
||||
|
|
Loading…
Reference in a new issue