提交 f2dc4d51 编写于 作者: D Dr. Stephen Henson

Encode b == NULL or blen == 0 as zero.

PR#3904
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 1ae3fdbe
......@@ -158,8 +158,8 @@ static size_t i2c_ibuf(const unsigned char *b, size_t blen, int neg,
if (pad)
*(p++) = pb;
if (blen == 0)
*(p++) = 0;
if (b == NULL || blen == 0)
*p = 0;
else if (!neg)
memcpy(p, b, blen);
else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册