提交 b0333e69 编写于 作者: G Graeme Perrow 提交者: Rich Salz

RT3670: Check return from BUF_MEM_grow_clean

Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 5006c322
......@@ -570,7 +570,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++);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册