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:
cec0a00
)
Sanity check input length in OPENSSL_uni2asc().
author
Dr. Stephen Henson
<steve@openssl.org>
Fri, 5 Aug 2016 16:59:32 +0000
(17:59 +0100)
committer
Dr. Stephen Henson
<steve@openssl.org>
Fri, 5 Aug 2016 17:58:56 +0000
(18:58 +0100)
Thanks to Hanno Böck for reporting this bug.
Reviewed-by: Rich Salz <rsalz@openssl.org>
crypto/pkcs12/p12_utl.c
patch
|
blob
|
history
diff --git
a/crypto/pkcs12/p12_utl.c
b/crypto/pkcs12/p12_utl.c
index 408c495e5001770565ee5666289fce50f62f3498..c4feb90b9e3f34b21d9990c60cc0d447caa6ea72 100644
(file)
--- 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])