[openssl-commits] [openssl] master update
Dr. Stephen Henson
steve at openssl.org
Sat Jun 13 11:26:56 UTC 2015
The branch master has been updated
via f2dc4d517fa11208b90ba0e92a2590f8cfdafb28 (commit)
from 1ae3fdbe6a7e78eef4d7678cb08ff468481c24ad (commit)
- Log -----------------------------------------------------------------
commit f2dc4d517fa11208b90ba0e92a2590f8cfdafb28
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Fri Jun 12 22:18:36 2015 +0100
Encode b == NULL or blen == 0 as zero.
PR#3904
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/asn1/a_int.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/asn1/a_int.c b/crypto/asn1/a_int.c
index 9a58378..0d020e0 100644
--- 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 || blen == 0)
+ *p = 0;
else if (!neg)
memcpy(p, b, blen);
else {
More information about the openssl-commits
mailing list