[FIX] Add NULL check for strdup() return value in matroska.c#2204
[FIX] Add NULL check for strdup() return value in matroska.c#2204aparnatonni wants to merge 1 commit intoCCExtractor:masterfrom
Conversation
b3f4ed2 to
378eedc
Compare
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results, when compared to test for commit 5c87a33...:
Your PR breaks these cases:
NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Check the result page for more info. |
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results, when compared to test for commit 5c87a33...:
NOTE: The following tests have been failing on the master branch as well as the PR:
Congratulations: Merging this PR would fix the following tests:
This PR does not introduce any new test failures. However, some tests are failing on both master and this PR (see above). Check the result page for more info. |
|
Closing — the strdup NULL checks in matroska.c are now covered by #2193, which was just merged. Thanks for the PR! |
In the parse_segment_track_entry() function of the src/lib_ccx/matroska.c file, the strdup("eng") function is called twice without checking the return value, i.e., NULL. If the strdup() function fails, it will return NULL, and the lang variable will become NULL, causing a crash.
Reason for the PR:
Sanity check:
The previous fix attempt was given by PR #2163, but it was closed because the fatal() call was missing, and the indentation was incorrect. This PR has follows the pattern used in the ocr.c file at line 57.
Fix: