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 7E04C48481 for ; Tue, 15 Jul 2025 13:34:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 15AAB68DE93; Tue, 15 Jul 2025 16:34:08 +0300 (EEST) Received: from mail-ua1-f42.google.com (mail-ua1-f42.google.com [209.85.222.42]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 548F968C5E3 for ; Tue, 15 Jul 2025 16:34:01 +0300 (EEST) Received: by mail-ua1-f42.google.com with SMTP id a1e0cc1a2514c-87f2adec2b7so2531708241.0 for ; Tue, 15 Jul 2025 06:34:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1752586439; x=1753191239; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6TnGV04p3d3uh8ONcgQBztLEwNkjzc6ISHBQ8d0sLWw=; b=gcnv6g0uSemKxbGD7HEN2HIlI++DBtaEugMxAllpBKjOzq2POGNW15ipw16y3YtXlN LS32NTeEyIq7TQvd5aMHfCfARr+ZP2A0npC0siqXACZx7eLAaeUwQl/lgtP4C8+MRMnc EYbswNXRpFFhWvjSVcrw8qAm45r9zIWSE4QNXjSxPX/HN1u+NmmjVUV+oVtEZ74xx/+7 u2kumS3ZvPc7Ps1yuDyboiK/kgZXdvfc9OdsV50GbU4mA/Cgl+STlOF6QszeTgRILa3+ z06h7vUwP5tiT7YUO4uSFN/l6q6XctKeD+e5LPn3YLW5K/moQiWBio66YTuQyTDaOFpd EVGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752586439; x=1753191239; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6TnGV04p3d3uh8ONcgQBztLEwNkjzc6ISHBQ8d0sLWw=; b=HKbX8q3A89q6Z0KmuEeeKvnP1VTe0dAgqd8sideG9UDn+9r9cNBBJ/uR5sGc+exqbA EaprwasFtvqFv+lI4J7kh4DEB8j7ScDutXDzP9KtrNtbNr20vBcNz5ERCADSI7EdT2bF 5SmMKt7DFlpgEPWYFhfNJgDSgK1btfSXXr25g/dxNPkRRCaiM9n79NYsxEy+AoZN8euV 3mULZG75mZgeMr98l6hN7vPXmWTos/rJa+g3+peErxNYhcuMHjqCMx7qPNEKEdOZX9CE +SCYLza6glUFe74JinNP16l+wDonTXd+qbsbuuJVUE/BixroRyIgHct4SwlYqRTaSn2I EgjQ== X-Gm-Message-State: AOJu0Yw1QWXwBMM4wgnM5NySpkcrT2CBISIJGhw9HniUCnKYl5WCv58p BCVGrc5Oyn9cquGRe1P753B0zsumKzNd/ffnSYtMxGIeBa5xllqErsnQTY1k8A== X-Gm-Gg: ASbGnct9kvXtciofxF05OHsI5OaZWlko816se7LwQ1GYX4Tsn1+jcw8HxnfMEFm+GOa gCldefd3cX6QGcCyKVGrt0IqJZS2gCURs0e+9IlGErnYXaoBgMc9MwnmU3aHJsQokQUJaErxoa1 7HIlT2c4ZYOz5e/o1PpqVEz7jYZMK79BS7UWxV/s+XTwLCPixLNb6SLa81f+OwhDEfUPlc3WKik pzJPi/WhqxChpaq4ZME+yN+SMnx262wifgDl6y3hnGrbWISAA9p1GaEC8HiWhmPfyi/g4QC9yVC WoccFd1eUq8pq8A0vMfkNNUh5K7utBZYnCAUHNWgT2W7QlLpu33KEBUptjPeUpReLKO7wzn3jQT /qXvOP6uFdqblIvL10Tw= X-Google-Smtp-Source: AGHT+IElELKUGP2fQUXJOHlv/Y/LtlfgnZ2vRkLWVZ7hbuHtjbiKCu5rsXG0p+sYJuowQG+NoFk5RA== X-Received: by 2002:a05:6102:3049:b0:4e9:a2bd:b455 with SMTP id ada2fe7eead31-4f64266c93emr8937993137.14.1752586438881; Tue, 15 Jul 2025 06:33:58 -0700 (PDT) Received: from Gryph ([2800:2121:b000:82e:d503:1d72:3afc:99c0]) by smtp.gmail.com with ESMTPSA id ada2fe7eead31-4f7d535c1f3sm739216137.25.2025.07.15.06.33.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Jul 2025 06:33:58 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Tue, 15 Jul 2025 10:33:10 -0300 Message-ID: <20250715133310.1976-1-jamrial@gmail.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250714221451.GQ29660@pb2> References: <20250714221451.GQ29660@pb2> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avcodec/motion_est: don't add offsets to NULL pointers 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 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: Fixes: libavcodec/motion_est.c:94:31: runtime error: applying zero offset to null pointer Signed-off-by: James Almer --- libavcodec/motion_est.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index 93be712cc0..3273451f9a 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -91,12 +91,12 @@ static inline void init_ref(MotionEstContext *c, uint8_t *const src[3], }; int i; for(i=0; i<3; i++){ - c->src[0][i]= src [i] + offset[i]; - c->ref[0][i]= ref [i] + offset[i]; + c->src[0][i]= src[i] ? FF_PTR_ADD(src[i], offset[i]) : NULL; + c->ref[0][i]= ref[i] ? FF_PTR_ADD(ref[i], offset[i]) : NULL; } if(ref_index){ for(i=0; i<3; i++){ - c->ref[ref_index][i]= ref2[i] + offset[i]; + c->ref[ref_index][i]= ref2[i] ? FF_PTR_ADD(ref2[i], offset[i]) : NULL; } } } -- 2.50.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".