Merge pull request #436 from JacobBarthelmeh/master

fix index to check for sperator value
This commit is contained in:
toddouska
2016-06-06 14:52:20 -07:00

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 */