From 015960e6a27d1846468113804eee06d483b54ae1 Mon Sep 17 00:00:00 2001 From: Todd A Ouska Date: Tue, 12 Jul 2011 13:53:45 -0700 Subject: [PATCH] rsa warning changes, submitted by Kevin Baca --- ctaocrypt/src/rsa.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ctaocrypt/src/rsa.c b/ctaocrypt/src/rsa.c index 3e581a33c..2a3c7f126 100644 --- a/ctaocrypt/src/rsa.c +++ b/ctaocrypt/src/rsa.c @@ -279,8 +279,10 @@ int RsaPrivateDecrypt(const byte* in, word32 inLen, byte* out, word32 outLen, byte* tmp; byte* pad = 0; - if ( !(tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_RSA)) ) + tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_RSA); + if (tmp == NULL) { return MEMORY_E; + } XMEMCPY(tmp, in, inLen); @@ -322,8 +324,10 @@ int RsaSSL_Verify(const byte* in, word32 inLen, byte* out, word32 outLen, byte* tmp; byte* pad = 0; - if ( !(tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_RSA)) ) + tmp = (byte*)XMALLOC(inLen, key->heap, DYNAMIC_TYPE_RSA); + if (tmp == NULL) { return MEMORY_E; + } XMEMCPY(tmp, in, inLen);