Fix null pointer dereference in Composable::available_image_bounds - #2055
Open
La1itchauhan wants to merge 1 commit into
Open
La1itchauhan wants to merge 1 commit into
La1itchauhan wants to merge 1 commit into
Conversation
|
|
La1itchauhan
force-pushed
the
fix/issue-2045-available-image-bounds
branch
from
September 19, 2026 18:55
0ee2819 to
2b0b748
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2055 +/- ##
==========================================
+ Coverage 83.52% 83.55% +0.02%
==========================================
Files 182 182
Lines 13533 13538 +5
Branches 1255 1256 +1
==========================================
+ Hits 11303 11311 +8
+ Misses 2057 2054 -3
Partials 173 173
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
La1itchauhan
force-pushed
the
fix/issue-2045-available-image-bounds
branch
from
September 19, 2026 19:01
2b0b748 to
b8de01f
Compare
La1itchauhan
marked this pull request as draft
September 19, 2026 19:06
Composable::available_image_bounds writes to *error_status without checking whether the pointer is non-null. Because error_status defaults to nullptr, calling available_image_bounds() on any Composable or subclass that does not override it (such as Gap) causes a crash. Added a null check before assigning *error_status, and added unit tests in both C++ (tests/test_composition.cpp) and Python (tests/test_item.py) verifying that calls with default nullptr and explicit nullptr do not crash, and calls with valid error_status report NOT_IMPLEMENTED. Fixes AcademySoftwareFoundation#2045. Signed-off-by: La1itchauhan <chauhanlalitofficial@gmail.com>
La1itchauhan
force-pushed
the
fix/issue-2045-available-image-bounds
branch
from
September 19, 2026 19:07
b8de01f to
7e07199
Compare
La1itchauhan
marked this pull request as ready for review
September 19, 2026 19:13
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.
Fixes #2045
Composable::available_image_bounds(ErrorStatus* error_status)was writing directly to*error_statuswithout checking if the pointer was null. Becauseerror_statusdefaults tonullptr, callingavailable_image_bounds()onComposableor derived classes that do not override it (such asGapandTransition) caused a segmentation fault.ErrorStatus::NOT_IMPLEMENTEDto*error_status, consistent withComposable::duration.GapandTransition) inheriting the base implementation.Reference associated tests.
test_composable_available_image_boundsintests/test_composition.cppverifying that calls with defaultnullptrand explicitnullptrdo not crash, and that passing anErrorStatuspointer correctly reportsNOT_IMPLEMENTED.test_available_image_boundsintests/test_item.pyto cover the Python bindings.