summaryrefslogtreecommitdiff
path: root/extra/yassl/taocrypt/src/rsa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'extra/yassl/taocrypt/src/rsa.cpp')
-rw-r--r--extra/yassl/taocrypt/src/rsa.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/extra/yassl/taocrypt/src/rsa.cpp b/extra/yassl/taocrypt/src/rsa.cpp
index 79a8a8f1c4f..73f678e2674 100644
--- a/extra/yassl/taocrypt/src/rsa.cpp
+++ b/extra/yassl/taocrypt/src/rsa.cpp
@@ -140,6 +140,10 @@ word32 RSA_BlockType2::UnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen,
void RSA_BlockType1::Pad(const byte* input, word32 inputLen, byte* pkcsBlock,
word32 pkcsBlockLen, RandomNumberGenerator&) const
{
+ // sanity checks
+ if (input == NULL || pkcsBlock == NULL)
+ return;
+
// convert from bit length to byte length
if (pkcsBlockLen % 8 != 0)
{