mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avformat/mpegts: Limit copied data to space
Fixes: out of array access Fixes: 26816/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTSRAW_fuzzer-6282861159907328.fuzz Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Marton Balint <cus@passwd.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 79cf7c71910a69b9f22b3e7ee6508a771262abaf) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9d6c492479
commit
faf492237d
@ -2638,7 +2638,7 @@ static int mpegts_raw_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
return ret;
|
||||
}
|
||||
if (data != pkt->data)
|
||||
memcpy(pkt->data, data, ts->raw_packet_size);
|
||||
memcpy(pkt->data, data, TS_PACKET_SIZE);
|
||||
finished_reading_packet(s, ts->raw_packet_size);
|
||||
if (ts->mpeg2ts_compute_pcr) {
|
||||
/* compute exact PCR for each packet */
|
||||
|
Loading…
x
Reference in New Issue
Block a user