mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2026-02-03 21:23:48 +00:00
[PR #1566] [MERGED] **[FIX]** fix infinite loop in MP4 file type detector and processor #2283
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/CCExtractor/ccextractor/pull/1566
Author: @xopok
Created: 9/4/2023
Status: ✅ Merged
Merged: 1/8/2024
Merged by: @canihavesomecoffee
Base:
master← Head:patch-1📝 Commits (7)
a926398Update stream_functions.c: fix MP4 file type detector6d017b5Update CHANGES.TXT323f803Treat a candidate MP4 box as invalid instead of bailing outc9c2b1eFix stuck mp4 processing inprocess_avc_samplebd1be6dFix the stats code to not count zero-sized NALs and avoid dereferencing memory past the NAL end0650312Add comment.0452006Format changes📊 Changes
3 files changed (+27 additions, -3 deletions)
View changed files
📝
docs/CHANGES.TXT(+1 -0)📝
src/lib_ccx/mp4.c(+25 -2)📝
src/lib_ccx/stream_functions.c(+1 -1)📄 Description
On bad inputs containing e.g. the following sequence of bytes within the first 1MiB "ff ff ff ff 6d 65 74 61"
detect_stream_typewas executing an infinite loop because "ff ff ff ff" was interpreted as a length of the candidate "meta" MP4 box, caused the size_t overflow insideisValidMP4Boxwhich pointednextBoxLocationto the previous byte and the execution flow processed the same "meta" again.In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
{pull request content here}
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.