Release 2.3.0 - #32
Closed
bunnam988 wants to merge 6 commits into
Closed
Conversation
Release 2.2.0 2.2.0
…arsing (#26) 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.
…y multipart bodies (#27) - In process_multipart_form_data, replace post_data = content_data with post_data = strdup(content_data) when there are no non-file fields. - content_data is freed by caller (ccsp_post_module_open), so aliasing caused double-free/heap corruption. - Prevents crash pattern seen as SIGSEGV/SIGABRT in core dumps. --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
## Summary Adds a caller workflow that runs the shared PR format check from `rdkcentral/build_tools_workflows`. ## What it does Automatically checks every new/edited PR (including fork PRs) for: - Title format: `TICKET-123 : description` (multiple tickets supported) - Required description fields: Reason for change, Test Procedure, Risks, Priority Fails the check and posts a reminder comment if format is incorrect. Deletes the comment automatically when fixed. ## Files changed - `.github/workflows/pr-lint.yml` (9 lines — caller only, no logic)
Contributor
There was a problem hiding this comment.
Pull request overview
Release 2.3.0 updates core parsing/session/post handling and adds regression coverage plus a PR-format lint workflow.
Changes:
- Fix multipart parsing behavior so file-only multipart requests don’t populate
_POST(and avoid danglingpost_data). - Harden
log_syntax_error()to avoid out-of-bounds access for malformed includes. - Improve session creation cleanup/leak handling and add new regression tests; update test build to include session/post sources; add PR lint workflow and changelog entry.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/parser_test.cpp |
Adds regression tests for session lifecycle and multipart file-only behavior; introduces small RAII guards for env/stdin. |
tests/CMakeLists.txt |
Links jst_post.c and jst_session.c into the test binary to support new tests. |
source/jst_session.c |
Adds allocation failure handling and frees/cleans up previous session identifier on repeated create() calls. |
source/jst_post.c |
Keeps post_data unset for file-only multipart bodies (prevents returning raw multipart payload / dangling pointer). |
source/jst_parser.c |
Reworks log_syntax_error() to be safe when pointers are malformed and to avoid in-place buffer mutation/OOB access. |
CHANGELOG.md |
Adds the 2.3.0 release section. |
.github/workflows/pr-lint.yml |
Adds reusable-workflow-based PR format check. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+186
to
+193
| if(session_identifier) | ||
| { | ||
| char filename[SESSION_FILE_MAX_PATH]; | ||
| snprintf(filename, SESSION_FILE_MAX_PATH, "%s/%s", SESSION_TMP_DIR, session_identifier); | ||
| unlink(filename); | ||
| free(session_identifier); | ||
| session_identifier = NULL; | ||
| } |
Comment on lines
+7
to
+11
| #### [2.3.0](https://github.com/rdkcentral/javascript-templates/compare/2.2.0...2.3.0) | ||
|
|
||
| - RDKB-66032 : Add PR Format Check workflow [`#29`](https://github.com/rdkcentral/javascript-templates/pull/29) | ||
| - RDKB-64641 sets post_data = NULL to keep getPost() unset for file-only multipart bodies [`#27`](https://github.com/rdkcentral/javascript-templates/pull/27) | ||
| - RDKB-64256 fix OOB access in log_syntax_error for malformed include parsing [`#26`](https://github.com/rdkcentral/javascript-templates/pull/26) |
Comment on lines
+16
to
+18
| jobs: | ||
| lint: | ||
| uses: rdkcentral/build_tools_workflows/.github/workflows/pr-lint.yml@develop |
|
📋 PR Format Reminder
Expected: |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Release 2.3.0