You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
nuv: check size of buffer before accessing it instead of after.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
This commit is contained in:
@@ -164,7 +164,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
|||||||
return orig_size;
|
return orig_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf[0] != 'V' || buf_size < 12) {
|
if (buf_size < 12 || buf[0] != 'V') {
|
||||||
av_log(avctx, AV_LOG_ERROR, "not a nuv video frame\n");
|
av_log(avctx, AV_LOG_ERROR, "not a nuv video frame\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user