summaryrefslogtreecommitdiff
path: root/main/openssl/crypto/pem/pvkfmt.c
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-11-14 09:52:32 +0100
committerArne Schwabe <arne@rfc2549.org>2014-11-14 09:52:32 +0100
commitb28828796ad6d65ac463b41bba153f74e4531a6b (patch)
tree154b9f7436ae575e324f3374a5145e451bf649a8 /main/openssl/crypto/pem/pvkfmt.c
parente7a6c1a987ebee1ddb2f908ca028d613a5c52490 (diff)
Update OpenSSL version
Diffstat (limited to 'main/openssl/crypto/pem/pvkfmt.c')
-rw-r--r--main/openssl/crypto/pem/pvkfmt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/openssl/crypto/pem/pvkfmt.c b/main/openssl/crypto/pem/pvkfmt.c
index b1bf71a5..ae89f828 100644
--- a/main/openssl/crypto/pem/pvkfmt.c
+++ b/main/openssl/crypto/pem/pvkfmt.c
@@ -759,6 +759,11 @@ static EVP_PKEY *do_PVK_body(const unsigned char **in,
/* Copy BLOBHEADER across, decrypt rest */
memcpy(enctmp, p, 8);
p += 8;
+ if (keylen < 8)
+ {
+ PEMerr(PEM_F_DO_PVK_BODY, PEM_R_PVK_TOO_SHORT);
+ return NULL;
+ }
inlen = keylen - 8;
q = enctmp + 8;
if (!EVP_DecryptInit_ex(&cctx, EVP_rc4(), NULL, keybuf, NULL))