mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-26 16:51:29 +00:00
nuv: check buffer size before checking content.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
096231d497
commit
ebf6d1d295
@ -191,7 +191,7 @@ retry:
|
|||||||
}
|
}
|
||||||
if (c->codec_frameheader) {
|
if (c->codec_frameheader) {
|
||||||
int w, h, q, res;
|
int w, h, q, res;
|
||||||
if (buf[0] != 'V' || buf_size < 12) {
|
if (buf_size < 12 || buf[0] != 'V') {
|
||||||
av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame (wrong codec_tag?)\n");
|
av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame (wrong codec_tag?)\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user