projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Encode b == NULL or blen == 0 as zero.
[openssl.git]
/
crypto
/
asn1
/
a_int.c
diff --git
a/crypto/asn1/a_int.c
b/crypto/asn1/a_int.c
index 9a58378b8a61132f02d34870b029ed511d65a1c6..0d020e0c13031b440588e6a304685c61693bffc5 100644
(file)
--- a/
crypto/asn1/a_int.c
+++ b/
crypto/asn1/a_int.c
@@
-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 || b
len == 0)
+ *
p
= 0;
else if (!neg)
memcpy(p, b, blen);
else {