projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ae3fdb
)
Encode b == NULL or blen == 0 as zero.
author
Dr. Stephen Henson
<steve@openssl.org>
Fri, 12 Jun 2015 21:18:36 +0000
(22:18 +0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sat, 13 Jun 2015 11:25:42 +0000
(12:25 +0100)
PR#3904
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/asn1/a_int.c
patch
|
blob
|
history
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 {