Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-07-31 22:32:38 +0400
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2012-08-01 21:35:58 +0400
commite1bc0171c0e6ba85cc14a52b979d6cb00b0c38bb (patch)
treea24ed8474fa275db8028aa4f48e314c752aff8ee /libavcodec/nuv.c
parent1f68be4764adb0ee82ac0ca962ff467142ee2af9 (diff)
nuv: check size of buffer before accessing it instead of after.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libavcodec/nuv.c')
-rw-r--r--libavcodec/nuv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index bb236d1edf..17fcb70f99 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -164,7 +164,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_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");
return -1;
}