From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 079684A7E0 for ; Wed, 20 Aug 2025 09:05:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 4343A68D27A; Wed, 20 Aug 2025 12:05:48 +0300 (EEST) Received: from c1ad6a1ecdc3 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id AA6CC68D41C for ; Wed, 20 Aug 2025 12:05:46 +0300 (EEST) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] =?utf-8?q?=5BPATCH=5D_avcodec/hevc=3A_Fix_invalid?= =?utf-8?q?_null_pointer_check_=28PR_=2320290=29?= 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: , From: Zhao Zhili via ffmpeg-devel Reply-To: FFmpeg development discussions and patches Cc: Zhao Zhili Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Message-Id: <20250820090548.4343A68D27A@ffbox0-bg.ffmpeg.org> Date: Wed, 20 Aug 2025 12:05:48 +0300 (EEST) Archived-At: List-Archive: List-Post: PR #20290 opened by Zhao Zhili (quink) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20290 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20290.patch c5287178b4d added a null pointer check, but checked the wrong variable. &s->cur_frame->f->data[c_idx] cannot be null. >From c9eb2d1e047e079f542bdd3a789594fbc4151001 Mon Sep 17 00:00:00 2001 From: Zhao Zhili Date: Wed, 20 Aug 2025 09:46:47 +0100 Subject: [PATCH] avcodec/hevc: Fix invalid null pointer check c5287178b4d added a null pointer check, but checked the wrong variable. &s->cur_frame->f->data[c_idx] cannot be null. --- libavcodec/hevc/hevcdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index f44bda8a92..d3e5e58cfc 100644 --- a/libavcodec/hevc/hevcdec.c +++ b/libavcodec/hevc/hevcdec.c @@ -2096,7 +2096,7 @@ static void hls_prediction_unit(HEVCLocalContext *lc, int log2_cb_size, int partIdx, int idx) { #define POS(c_idx, x, y) \ - &s->cur_frame->f->data[c_idx] ? \ + s->cur_frame->f->data[c_idx] ? \ &s->cur_frame->f->data[c_idx][((y) >> sps->vshift[c_idx]) * linesize[c_idx] + \ (((x) >> sps->hshift[c_idx]) << sps->pixel_shift)] : NULL const HEVCContext *const s = lc->parent; -- 2.49.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".