diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2019-12-27 18:58:35 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2019-12-27 19:13:39 +0300 |
commit | 93671d675597e685215a9ade4ddf7b00271f5767 (patch) | |
tree | 2856c270288d1bd549a380ce5688450eb11a2962 /libavcodec/mvha.c | |
parent | 39561bbe77626458b28f186d03a2ba273d55b655 (diff) |
avcodec/mvha: fix warning: variable 'size' set but not used
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/mvha.c')
-rw-r--r-- | libavcodec/mvha.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mvha.c b/libavcodec/mvha.c index c270063b1c..afe5e511f2 100644 --- a/libavcodec/mvha.c +++ b/libavcodec/mvha.c @@ -161,6 +161,9 @@ static int decode_frame(AVCodecContext *avctx, type = AV_RB32(avpkt->data); size = AV_RL32(avpkt->data + 4); + if (size < 1 || size >= avpkt->size) + return AVERROR_INVALIDDATA; + if ((ret = ff_get_buffer(avctx, frame, 0)) < 0) return ret; |