Browse Source

Check NUV per-frame header for validity.

Since it contains dimensions parsing an invalid one has rather
annoying effects.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
tags/n0.9
Reimar Döffinger 13 years ago
parent
commit
6f3ebcc320
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/nuv.c

+ 2
- 2
libavcodec/nuv.c View File

@@ -184,8 +184,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
if (c->codec_frameheader) {
int w, h, q;
if (buf_size < 12) {
av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame\n");
if (buf[0] != 'V' || buf_size < 12) {
av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame (wrong codec_tag?)\n");
return -1;
}
w = AV_RL16(&buf[6]);


Loading…
Cancel
Save