condition of padLen check was opposite.
Reported by: "lg" <zevlg@yandex.ru> Reviewed by: Lev Walkin <vlm@netli.com>
This commit is contained in:
parent
d099a9d164
commit
eb159f5b2e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120157
@ -225,7 +225,7 @@ int rijndael_padEncrypt(cipherInstance *cipher, keyInstance *key,
|
||||
outBuffer += 16;
|
||||
}
|
||||
padLen = 16 - (inputOctets - 16*numBlocks);
|
||||
if (padLen > 0 && padLen <= 16)
|
||||
if (padLen <= 0 || padLen > 16)
|
||||
return BAD_CIPHER_STATE;
|
||||
bcopy(input, block, 16 - padLen);
|
||||
for (cp = block + 16 - padLen; cp < block + 16; cp++)
|
||||
|
Loading…
Reference in New Issue
Block a user