Skip to content

RDKB-64256 fix OOB access in log_syntax_error for malformed include parsing#26

Open
pavankumar464 wants to merge 2 commits into
developfrom
bug/RDKB-64256
Open

RDKB-64256 fix OOB access in log_syntax_error for malformed include parsing#26
pavankumar464 wants to merge 2 commits into
developfrom
bug/RDKB-64256

Conversation

@pavankumar464

Copy link
Copy Markdown
Contributor

Guard against null pointers in log_syntax_error.
Avoid reading/writing at end by using bounded line scanning.
Replace temporary in-place buffer mutation with length-limited logging (%.*s).
Prevent potential SIGSEGV/SIGABRT when malformed include syntax reaches EOF.

…arsing

Guard against null pointers in log_syntax_error.

Avoid reading/writing at end by using bounded line scanning.

Replace temporary in-place buffer mutation with length-limited logging (%.*s).

Prevent potential SIGSEGV/SIGABRT when malformed include syntax reaches EOF.
Copilot AI review requested due to automatic review settings July 1, 2026 05:04
@pavankumar464 pavankumar464 requested a review from a team as a code owner July 1, 2026 05:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens malformed include(...) parsing error handling in the JST parser to avoid out-of-bounds access and crashes when the parser reaches EOF or encounters invalid syntax.

Changes:

  • Adds null-pointer guarding in log_syntax_error.
  • Reworks line scanning to be bounded by end (avoiding reads/writes at EOF).
  • Switches logging from in-place buffer mutation to precision-limited %.*s printing.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/jst_parser.c Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants