mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-09 09:32:43 +00:00
avformat/movenc: free sgpd_entries on the roll-distance error path
Found-by: Ao Xijie Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
michaelni
parent
9a01c1cb6a
commit
b553b810c4
@@ -3364,8 +3364,10 @@ static int mov_preroll_write_stbl_atoms(AVIOContext *pb, MOVTrack *track)
|
||||
if (roll_samples_remaining > 0)
|
||||
distance = 0;
|
||||
/* Verify distance is a maximum of 32 (2.5ms) packets. */
|
||||
if (distance > 32)
|
||||
if (distance > 32) {
|
||||
av_freep(&sgpd_entries);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (i && distance == sgpd_entries[entries].roll_distance) {
|
||||
sgpd_entries[entries].count++;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user