Decode negative HTTP body integers consistently - #853
Merged
chrisgleissner merged 3 commits intoSep 14, 2026
Merged
Conversation
Collaborator
|
@barryw Thanks for spotting this. Could you please analyze which actual user facing features are degraded by this bug so we can triage it for 3.15? |
Contributor
Author
|
@chrisgleissner I think this is a 3.16 bug. I just don't like leaving broken code lying around. We can leave it until after 3.15 ships. |
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.
Negative one-, two- and three-byte HTTP body integers decode as positive when plain
charis unsigned. Useint8_tfor the sign byte and multiplication instead of shifting a negative signed value.Introduced after 3.14 with the HTTP target. Tests cover zero, maximum positive, minimum negative and -1 at all four wire widths. Tested independently against
test-mergeat8596576f, in the upstream pipeline’smy_docker_image(host G++ 13.3.0):Same tests with unsigned
char, changing only the firmware fix:Red/green evidence; final CI build passed all five firmware targets and the application-space gate. Hardware E2E was not run.