Skip to content

Add Integer Overflow Sanity Check#8489

Merged
whoisj merged 1 commit intomainfrom
jwyman/tri-229-integer-overflow-in-http-server-byte-string-processing
Nov 6, 2025
Merged

Add Integer Overflow Sanity Check#8489
whoisj merged 1 commit intomainfrom
jwyman/tri-229-integer-overflow-in-http-server-byte-string-processing

Conversation

@whoisj
Copy link
Copy Markdown
Contributor

@whoisj whoisj commented Nov 3, 2025

This change adds a sanity check prior to a static cast of int32_t to int64_t to use as an offset.

While the current code cannot enter this state, this protects against future changes.

@whoisj whoisj force-pushed the jwyman/tri-229-integer-overflow-in-http-server-byte-string-processing branch from 583d78e to a9923b5 Compare November 5, 2025 18:31
Comment thread src/http_server.cc Outdated
Comment thread src/http_server.cc Outdated
@whoisj whoisj force-pushed the jwyman/tri-229-integer-overflow-in-http-server-byte-string-processing branch from 7880104 to c4158a6 Compare November 5, 2025 22:55
yinggeh
yinggeh previously approved these changes Nov 5, 2025
This change adds a sanity check prior to a static cast of `int32_t` to `int64_t` to use as an offset.

While the current code cannot enter this state, this protects against future changes.

Co-authored-by: Yingge He <157551214+yinggeh@users.noreply.github.com>
@whoisj whoisj force-pushed the jwyman/tri-229-integer-overflow-in-http-server-byte-string-processing branch from c4158a6 to 815fefb Compare November 5, 2025 23:33
@whoisj whoisj merged commit d074a3b into main Nov 6, 2025
3 checks passed
@whoisj whoisj deleted the jwyman/tri-229-integer-overflow-in-http-server-byte-string-processing branch November 6, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants