Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a mistake in matchBytes32Prefix, in both the new API version and the old one.
matchBytes32Prefix verify if the string sends by Oraclize as the result parameter of the callback is the SHA256 of the signature. Unfortunately, the comparison between the two byte arrays takes as a parameter the lenght of the string result, which is controlled by Oraclize. Therefore, it could be possible for the proof verification to pass even in the case Oraclize is returning an empty string in the callback.
If you see a more efficient way to do this, please suggest. Unfortunately, I was limited by the stack depth and I add to change the oraclize_randomDS_proofVerify__main to reduce the number of variables.