[openssl-commits] [openssl] master update
Dr. Stephen Henson
steve at openssl.org
Fri Aug 5 17:59:34 UTC 2016
The branch master has been updated
via 39a43280316f1b9c45be5ac5b04f4f5c3f923686 (commit)
from cec0a002ffebda5040f9a00ad0f67fbfad53b80f (commit)
- Log -----------------------------------------------------------------
commit 39a43280316f1b9c45be5ac5b04f4f5c3f923686
Author: Dr. Stephen Henson <steve at openssl.org>
Date: Fri Aug 5 17:59:32 2016 +0100
Sanity check input length in OPENSSL_uni2asc().
Thanks to Hanno Böck for reporting this bug.
Reviewed-by: Rich Salz <rsalz at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/pkcs12/p12_utl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/crypto/pkcs12/p12_utl.c b/crypto/pkcs12/p12_utl.c
index 408c495..c4feb90 100644
--- a/crypto/pkcs12/p12_utl.c
+++ b/crypto/pkcs12/p12_utl.c
@@ -42,7 +42,9 @@ char *OPENSSL_uni2asc(unsigned char *uni, int unilen)
{
int asclen, i;
char *asctmp;
-
+ /* string must contain an even number of bytes */
+ if (unilen & 1)
+ return NULL;
asclen = unilen / 2;
/* If no terminating zero allow for one */
if (!unilen || uni[unilen - 1])
More information about the openssl-commits
mailing list