Encode b == NULL or blen == 0 as zero.
PR#3904 Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
1ae3fdbe6a
commit
f2dc4d517f
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user