avcodec/cfhd: Fix decoding regression due to height check
authorVodyannikov Aleksandr <Aleksoid1978@mail.ru>
Fri, 21 Jul 2017 09:49:45 +0000 (11:49 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 23 Jul 2017 13:00:51 +0000 (15:00 +0200)
Fixes: Ticket6546

Regression since: 54aaadf648073149f1ac34f56cbde4e6c5aa22ef

Reviewed-by: Muhammad Faiz <mfcc64@gmail.com>
Reviewed-by: Kieran Kunhya <kierank@obe.tv>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 47c93657249f1a4bc8a7aaf2f9f3a33510bee38c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cfhd.c

index f78bad9..5ea8f24 100644 (file)
@@ -332,7 +332,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
             s->plane[s->channel_num].band[0][0].stride = data;
         } else if (tag == 28) {
             av_log(avctx, AV_LOG_DEBUG, "Lowpass height %"PRIu16"\n", data);
-            if (data < 3 || data > s->plane[s->channel_num].band[0][0].height) {
+            if (data < 3 || data > s->plane[s->channel_num].band[0][0].a_height) {
                 av_log(avctx, AV_LOG_ERROR, "Invalid lowpass height\n");
                 ret = AVERROR(EINVAL);
                 break;