forked from wolfSSL/wolfssl
Merge pull request #3009 from embhorn/zd10358
Fix OOB access in RsaUnPad
This commit is contained in:
@ -1596,7 +1596,7 @@ static int RsaUnPad(const byte *pkcsBlock, unsigned int pkcsBlockLen,
|
||||
byte invalid = 0;
|
||||
#endif
|
||||
|
||||
if (output == NULL || pkcsBlockLen == 0 || pkcsBlockLen > 0xFFFF) {
|
||||
if (output == NULL || pkcsBlockLen < 2 || pkcsBlockLen > 0xFFFF) {
|
||||
return BAD_FUNC_ARG;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user