aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-09-09 08:52:53 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2007-09-09 08:52:53 +0000
commit048905a484cde2abc051ed965d5ac6b973acbc79 (patch)
tree10ba97675fc1beaf00b41e92eb2cf6f30aa64adc /libavcodec
parent4f8a91c961db17643277305cdf0eabcffdb282a9 (diff)
downloadffmpeg-048905a484cde2abc051ed965d5ac6b973acbc79.tar.gz
10l, add check forgotten in last commit
Originally committed as revision 10442 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/nuv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index 665527bbe9..d07c868aa5 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -158,6 +158,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if (c->codec_frameheader) {
get_quant_quality(c, buf[10]);
rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, c->cq);
+ if (buf_size < 12) {
+ av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame\n");
+ return -1;
+ }
buf = &buf[12];
buf_size -= 12;
}