fix index to check for sperator value

This commit is contained in:
Jacob Barthelmeh
2016-06-06 10:34:35 -06:00
parent d05754f9db
commit e085be9485

View File

@ -657,8 +657,8 @@ static int wc_RsaUnPad_OAEP(byte *pkcsBlock, unsigned int pkcsBlockLen,
/* done with use of tmp buffer */ /* done with use of tmp buffer */
XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER); XFREE(tmp, NULL, DYNAMIC_TYPE_TMP_BUFFER);
/* advance idx to index of PS and msg separator */ /* advance idx to index of PS and msg separator, account for PS size of 0*/
idx = hLen + 2 + hLen; idx = hLen + 1 + hLen;
while (idx < pkcsBlockLen && pkcsBlock[idx] == 0) {idx++;} while (idx < pkcsBlockLen && pkcsBlock[idx] == 0) {idx++;}
/* create hash of label for comparision with hash sent */ /* create hash of label for comparision with hash sent */