diff options
author | Jack Lloyd <[email protected]> | 2017-08-25 11:46:49 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-25 17:36:51 -0400 |
commit | 9517d460a7b5281b7fdb40488db60795b41ccbd3 (patch) | |
tree | d0676a3ac027504e8c4540922ca952b63ba665cb /src | |
parent | 8ac2697a3b9e6242e2f6d0c5e1d83fc150fd6ff0 (diff) |
Fix bad iterator deref in OpenSSL RSA
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/prov/openssl/openssl_rsa.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/prov/openssl/openssl_rsa.cpp b/src/lib/prov/openssl/openssl_rsa.cpp index 58a09cb0d..b1c73d851 100644 --- a/src/lib/prov/openssl/openssl_rsa.cpp +++ b/src/lib/prov/openssl/openssl_rsa.cpp @@ -171,7 +171,9 @@ class OpenSSL_RSA_Verification_Operation : public PK_Ops::Verification_with_EMSA throw Invalid_Argument("OpenSSL RSA verify input too large"); secure_vector<uint8_t> inbuf(mod_sz); - copy_mem(&inbuf[mod_sz - msg_len], msg, msg_len); + + if(msg_len > 0) + copy_mem(&inbuf[mod_sz - msg_len], msg, msg_len); secure_vector<uint8_t> outbuf(mod_sz); |