From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id AC4C941093 for ; Sat, 10 Jun 2023 18:31:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1CB1868C236; Sat, 10 Jun 2023 21:31:18 +0300 (EEST) Received: from mail-02-1.mymagenta.at (mail-02-1.mymagenta.at [80.109.253.248]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2656668BE2D for ; Sat, 10 Jun 2023 21:31:11 +0300 (EEST) Received: from [192.168.232.136] (helo=ren-mail-psmtp-mg02.) by mail-02.mymagenta.at with esmtp (Exim 4.93) (envelope-from ) id 1q83Mk-002Mwk-GN for ffmpeg-devel@ffmpeg.org; Sat, 10 Jun 2023 20:31:10 +0200 Received: from localhost ([84.115.40.24]) by ren-mail-psmtp-mg02. with ESMTP id 83Mkqh99MbZLD83MkqrD2f; Sat, 10 Jun 2023 20:31:10 +0200 X-Env-Mailfrom: michael@niedermayer.cc X-Env-Rcptto: ffmpeg-devel@ffmpeg.org X-SourceIP: 84.115.40.24 X-CNFS-Analysis: v=2.4 cv=Ufwy9IeN c=1 sm=1 tr=0 ts=6484c16f a=4thelYDX6rwh+ygQwvsI+Q==:117 a=4thelYDX6rwh+ygQwvsI+Q==:17 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=GEAsPZ9sns4A:10 a=b94tihQPeBZ0Eo0hxYQA:9 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 10 Jun 2023 20:31:08 +0200 Message-Id: <20230610183109.24802-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 X-CMAE-Envelope: MS4xfOt7t3tewVzs4dB2kZUa44Cq5J6gmCVwrRRmzcreU0XbIn+M7veMMvvaF1nt++2hb1pT0oUgFrl8e4XmkMZcZhGJcfk1ESZ9DRIJAq+F9XGQmqYUtpp4 y7dVlCXzYAqJNsYKsJpcAOaRIVFxKjX1Zv7zupYj/UJiGXQvwdpoJYpjVWWYrh+xEUTkZni2i2EahQ== Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/jpeg2000dec: Check for reduction factor and image offset X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: This combination is not working (it writes out of array) Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000dec.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 0e95cca64e..d6f2a5938e 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -238,6 +238,11 @@ static int get_siz(Jpeg2000DecoderContext *s) return AVERROR_INVALIDDATA; } + if (s->reduction_factor && (s->image_offset_x || s->image_offset_y) ){ + av_log(s->avctx, AV_LOG_ERROR, "reduction factor with image offsets is not fully implemented"); + return AVERROR_PATCHWELCOME; + } + s->ncomponents = ncomponents; if (s->tile_width <= 0 || s->tile_height <= 0) { -- 2.17.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".