Repository navigation
Conversation
|
|
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.58% 83.60% +0.02%
==========================================
Files 182 182
Lines 13570 13575 +5
Branches 1260 1261 +1
==========================================
+ Hits 11342 11350 +8
+ Misses 2055 2052 -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:
|
2b0b748 to
b8de01f
Compare
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>
b8de01f to
7e07199
Compare
|
Hi @La1itchauhan - thanks, this PR is looking pretty good. We'll arrange for an OTIO committer to review it. Out of curiosity, how did you come across this issue, and what lead you to contribute to OTIO? |
|
Hi @jminor, |
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.