From patchwork Fri Jul 21 09:49:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 4410 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.1.76 with SMTP id 73csp692048vsb; Fri, 21 Jul 2017 02:50:02 -0700 (PDT) X-Received: by 10.28.170.8 with SMTP id t8mr4372012wme.111.1500630602547; Fri, 21 Jul 2017 02:50:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500630602; cv=none; d=google.com; s=arc-20160816; b=IryeSqaATtW8LNxOXuX1Oqp/4t9TwOUxPFYhS5Ay4YmX2Gf1WpmPjaNx6ooYvFJoVD JG/PdflNejKpHVUcgsiO6c8toe0Q5fUPgJiBrnW3RHw5NyGH2Qp9CiGgyz0xfzmKjkN/ Heb5VBLfEQ1KhLm8f3pe/873VT2HG6ZojDqtAeBp6lYxkchRFapIENgHPUHtStEr5SlZ 8L1v62leBO/ddhteOw2wiXY/EeJ3ErgEMVOpBjYXu1N/D2rbtPE1XxDhG4EB8rRXQmGW PshRdpJYe9yiK0kIkCaOKgaUstMTd8sSFt6O2h5cQps42yWIdoJtt6espSyKpsANTF09 iwRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=G1Iy9ubzNaz84UKcPLtdF3ofyisGCQr253CcqDyx264=; b=ky16hwVNjuuP3GxoIgzXgHgF03vnNl8Nft2lN4ZobzeVL38MJOnVHc0XL+QG7GOFaQ K22wCzcYAvemhsVy98gzAgqUcgQl1t8Fwi+aHutLzrp5oDUQM/wOsg2zOhq3uXVhFf8P baCOSPWFJJFwme6iav1VlqM0GTaWIoEYKFh7sUq9XlVIzPzHiqRv4Hqu2W65zV54Oslf F4nwIkhpaSz3tcNVBhaixzov2bzqEM8wzKERp4cuhgQqQnsBsC1HOqicTYkBxquDT6G6 DW/fje2+a3JfmeLyhT2N3Dpr4kLXDTC1f7pA0xXMJ+WttKDcFLyUQItKs9P6bu1GFSxY PJtg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k63si756048wmf.26.2017.07.21.02.50.01; Fri, 21 Jul 2017 02:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 74496689C62; Fri, 21 Jul 2017 12:49:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe01-3.mx.upcmail.net (vie01a-qmta-pe01-3.mx.upcmail.net [62.179.121.180]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DE9C5689A92 for ; Fri, 21 Jul 2017 12:49:44 +0300 (EEST) Received: from [172.31.218.43] (helo=vie01a-dmta-pe05-1.mx.upcmail.net) by vie01a-pqmta-pe01.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dYUZE-0006Y5-Ls for ffmpeg-devel@ffmpeg.org; Fri, 21 Jul 2017 11:49:52 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe05.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dYUZ8-00089z-VH for ffmpeg-devel@ffmpeg.org; Fri, 21 Jul 2017 11:49:46 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id nMpl1v01V0S5wYM01Mpmsl; Fri, 21 Jul 2017 11:49:46 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 21 Jul 2017 11:49:45 +0200 Message-Id: <20170721094945.3950-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.13.0 Subject: [FFmpeg-devel] [PATCH] avcodec/cfhd: Fix decoding regression due to height check X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Vodyannikov Aleksandr MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Vodyannikov Aleksandr Fixes: Ticket6546 Regression since: 54aaadf648073149f1ac34f56cbde4e6c5aa22ef Signed-off-by: Michael Niedermayer --- libavcodec/cfhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index f78bad9ae1..5ea8f24821 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -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;