mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-09 14:14:39 +02:00
avcodec/diracdec: Change frame_number to 64bit as its a 32bit from the bitstream and we also have a -1 special case
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 9291/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-6324345860259840 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 462d1be6dec5ff4768be8c202f359cbf037db3c6) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
00c3f178a8
commit
1c05c6bd91
@ -142,7 +142,7 @@ typedef struct DiracContext {
|
|||||||
GetBitContext gb;
|
GetBitContext gb;
|
||||||
dirac_source_params source;
|
dirac_source_params source;
|
||||||
int seen_sequence_header;
|
int seen_sequence_header;
|
||||||
int frame_number; /* number of the next frame to display */
|
int64_t frame_number; /* number of the next frame to display */
|
||||||
Plane plane[3];
|
Plane plane[3];
|
||||||
int chroma_x_shift;
|
int chroma_x_shift;
|
||||||
int chroma_y_shift;
|
int chroma_y_shift;
|
||||||
@ -2040,7 +2040,7 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*got_frame)
|
if (*got_frame)
|
||||||
s->frame_number = picture->display_picture_number + 1;
|
s->frame_number = picture->display_picture_number + 1LL;
|
||||||
|
|
||||||
return buf_idx;
|
return buf_idx;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user