verify case with unexpected input

This commit is contained in:
Jacob Barthelmeh
2016-09-08 15:32:09 -06:00
parent 3e80d966d2
commit f4e604dec3

View File

@ -209,7 +209,7 @@ int wc_SignatureVerify(
if (plain_len < sig_len) {
plain_len = sig_len;
}
plain_data = (byte*)XMALLOC(hash_len, NULL, DYNAMIC_TYPE_TMP_BUFFER);
plain_data = (byte*)XMALLOC(plain_len, NULL, DYNAMIC_TYPE_TMP_BUFFER);
if (plain_data) {
/* Perform verification of signature using provided RSA key */
ret = wc_RsaSSL_Verify(sig, sig_len, plain_data, plain_len,