Reject odd-length hex to prevent reading data from outside of buffer.#155
Open
elnerd wants to merge 1 commit into
Open
Reject odd-length hex to prevent reading data from outside of buffer.#155elnerd wants to merge 1 commit into
elnerd wants to merge 1 commit into
Conversation
1-byte heap-OOB READ in li_hex2bin when the input length is odd.
Member
|
Current usage of In any case, the sanity check is reasonable and I have accepted your patch. Thank you. In the future, please match the whitespace style in with the surrounding code. Your one-line patch changed 4 spaces to a tab, and had extraneous trailing whitespace at the end of the line. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When the input hex has odd length, li_hex2bin will read outside of the input buffer.
Added check to disallow odd-length buffers.