projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Sanity check input length in OPENSSL_uni2asc().
[oweals/openssl.git]
/
crypto
/
pkcs12
/
p12_utl.c
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])