aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/prov/openssl/openssl_rsa.cpp4
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);