[IMPROVEMENT] Standardize number_bytes upper bound in ts_tables_epg.c#2252
Closed
THE-Amrit-mahto-05 wants to merge 10 commits intoCCExtractor:masterfrom
Closed
[IMPROVEMENT] Standardize number_bytes upper bound in ts_tables_epg.c#2252THE-Amrit-mahto-05 wants to merge 10 commits intoCCExtractor:masterfrom
THE-Amrit-mahto-05 wants to merge 10 commits intoCCExtractor:masterfrom
Conversation
Contributor
Author
|
@cfsmp3 |
Contributor
|
Closing — duplicate of #2253, and bundles unrelated Rust parser changes. |
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.
In raising this pull request, I confirm the following (please check boxes):
Reason for this PR:
Sanity check:
Reason
In
ts_tables_epg.c, the variablenumber_byteshad inconsistent upper bounds:This inconsistency can lead to unsafe memory handling and unpredictable parsing behavior.
Change
Standardized the upper bound to 200 to match existing validation logic.
Repro instructions
This change improves consistency and safety in bounds checking.
No specific crash case was reproduced, but inconsistent limits were observed in code.
why 200
The value 200 is already used in another validation block in the same file
(compression_type/mode check), so this change ensures consistency and avoids arbitrary limits.
Proof of warning when it was 500:


after chaning to 200:
