mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avformat/avidec: dv does not support palettes
Fixes: memleak
Fixes: 26937/clusterfuzz-testcase-minimized-ffmpeg_dem_AVI_fuzzer-5763003338981376
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1b373b41d9
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
be9ba46370
commit
53fccd5726
@ -1422,6 +1422,7 @@ resync:
|
||||
if (avi->stream_index >= 0) {
|
||||
AVStream *st = s->streams[avi->stream_index];
|
||||
AVIStream *ast = st->priv_data;
|
||||
int dv_demux = CONFIG_DV_DEMUXER && avi->dv_demux;
|
||||
int size, err;
|
||||
|
||||
if (get_subtitle_pkt(s, st, pkt))
|
||||
@ -1444,7 +1445,7 @@ resync:
|
||||
return err;
|
||||
size = err;
|
||||
|
||||
if (ast->has_pal && pkt->size < (unsigned)INT_MAX / 2) {
|
||||
if (ast->has_pal && pkt->size < (unsigned)INT_MAX / 2 && !dv_demux) {
|
||||
uint8_t *pal;
|
||||
pal = av_packet_new_side_data(pkt,
|
||||
AV_PKT_DATA_PALETTE,
|
||||
@ -1458,7 +1459,7 @@ resync:
|
||||
}
|
||||
}
|
||||
|
||||
if (CONFIG_DV_DEMUXER && avi->dv_demux) {
|
||||
if (dv_demux) {
|
||||
AVBufferRef *avbuf = pkt->buf;
|
||||
size = avpriv_dv_produce_packet(avi->dv_demux, pkt,
|
||||
pkt->data, pkt->size, pkt->pos);
|
||||
|
Loading…
Reference in New Issue
Block a user