one more opossite conditiion.

Reported by:	"lg" <zevlg@yandex.ru>
This commit is contained in:
Hajimu UMEMOTO 2003-09-18 17:26:56 +00:00
parent eb975edd06
commit 66476d45b8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120206

View File

@ -246,7 +246,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;
for (i = 0; i < 16 - padLen; i++) {
block[i] = input[i] ^ iv[i];