Only cleanse sbuf if it is not NULL.

PR#2339
This commit is contained in:
Dr. Stephen Henson 2014-07-05 22:32:39 +01:00
parent 114216bca0
commit 6ea511211c

View File

@ -288,8 +288,11 @@ int FIPS_rsa_sign_digest(RSA *rsa, const unsigned char *md, int md_len,
*siglen=j; *siglen=j;
} }
psserr: psserr:
OPENSSL_cleanse(sbuf, i); if (sbuf)
OPENSSL_free(sbuf); {
OPENSSL_cleanse(sbuf, i);
OPENSSL_free(sbuf);
}
return ret; return ret;
} }