You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
jvdec: check that the video_size fits in the packet.
Prevents use of out of array data and fate failure. Found-by: durandal_1707 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -143,7 +143,7 @@ static int decode_frame(AVCodecContext *avctx,
|
|||||||
buf += 5;
|
buf += 5;
|
||||||
|
|
||||||
if (video_size) {
|
if (video_size) {
|
||||||
if(video_size < 0) {
|
if(video_size < 0 || video_size > buf_size) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "video size %d invalid\n", video_size);
|
av_log(avctx, AV_LOG_ERROR, "video size %d invalid\n", video_size);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
@@ -6,4 +6,3 @@
|
|||||||
0, 5, 5, 1, 192000, 0xb8e331eb
|
0, 5, 5, 1, 192000, 0xb8e331eb
|
||||||
0, 6, 6, 1, 192000, 0xd35b2053
|
0, 6, 6, 1, 192000, 0xd35b2053
|
||||||
0, 7, 7, 1, 192000, 0x01062188
|
0, 7, 7, 1, 192000, 0x01062188
|
||||||
0, 8, 8, 1, 192000, 0xa3a73b87
|
|
||||||
|
Reference in New Issue
Block a user