summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/pkcs12/p12_utl.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/pkcs12/p12_utl.c')
-rw-r--r--crypto/openssl/crypto/pkcs12/p12_utl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/pkcs12/p12_utl.c b/crypto/openssl/crypto/pkcs12/p12_utl.c
index a0b992e..e466f76 100644
--- a/crypto/openssl/crypto/pkcs12/p12_utl.c
+++ b/crypto/openssl/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])
OpenPOWER on IntegriCloud