Browse Source

nuv: check buffer size before checking content.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
ebf6d1d295
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/nuv.c

+ 1
- 1
libavcodec/nuv.c View File

@@ -191,7 +191,7 @@ retry:
}
if (c->codec_frameheader) {
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");
return AVERROR_INVALIDDATA;
}


Loading…
Cancel
Save