提交 2fc45cb8 编写于 作者: A Andy Polyakov

apps/speed.c: address asan failure with small -bytes and large -misalign.

Reviewed-by: NTim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6311)
上级 44ca7565
......@@ -1690,7 +1690,10 @@ int speed_main(int argc, char **argv)
}
}
buflen = lengths[size_num - 1] + MAX_MISALIGNMENT + 1;
buflen = lengths[size_num - 1];
if (buflen < 36) /* size of random vector in RSA bencmark */
buflen = 36;
buflen += MAX_MISALIGNMENT + 1;
loopargs[i].buf_malloc = app_malloc(buflen, "input buffer");
loopargs[i].buf2_malloc = app_malloc(buflen, "input buffer");
memset(loopargs[i].buf_malloc, 0, buflen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册