Skip to content

Commit

Permalink
Encode b == NULL or blen == 0 as zero.
Browse files Browse the repository at this point in the history
PR#3904

Reviewed-by: Rich Salz <[email protected]>
  • Loading branch information
snhenson committed Jun 13, 2015
1 parent 1ae3fdb commit f2dc4d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/asn1/a_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f2dc4d5

Please sign in to comment.