aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/pkcs12/p12_utl.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/pkcs12/p12_utl.c')
-rw-r--r--crypto/pkcs12/p12_utl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/pkcs12/p12_utl.c b/crypto/pkcs12/p12_utl.c
index a0b992eab66c..e466f762ffda 100644
--- a/crypto/pkcs12/p12_utl.c
+++ b/crypto/pkcs12/p12_utl.c
@@ -91,6 +91,10 @@ 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])