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 EE2704E195 for ; Sat, 14 Feb 2026 01:46:53 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'0+HMOOMlVg3RKrYu2bvuz5S2Ime8mq9/yLX1lVDbQHc=', expected b'2bThEGMfq3mI1S1TtMNjAU/kOPgM6zZe7idnOaF9mJY=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1771033606; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=0+HMOOMlVg3RKrYu2bvuz5S2Ime8mq9/yLX1lVDbQHc=; b=alQLiOlEhsmBe5u7F3iMohdNCCS8djiY4NwHy2m/Y8YDU7i7CZu0LLW5eWpsHVfoD/q5Y dvFaqFaI2AT7oz3WGFugZ/9J+oVka/1ALfeUdQrZuHuxsE/rBAmRZohhmuc6R40GYJfmyG8 e6Y7gpTHbUv4pH68oTpIlvftn8ucnqfCFah9VqTL+Ptwawa60aiyAmU9aG/FI/6IkLxG/W7 q8Gwqr6SVBhblYUkahupAtD2yH1kslZKIIcyG4B0z4MxwuZ1VN8QONbHYPQLETc6g6s0T8i Ig3R/XopI+ZHTtW/Qvnxn8Ph6b1gbY1Ro2vI9hjeDsPoY43fndkViy/18YOw== Received: from [172.20.0.3] (unknown [172.20.0.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id B09F869116F; Sat, 14 Feb 2026 03:46:46 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1771033595; b=ZS7YMp4er9+tQrrNF0gzvdB4sBSZR0NJbdlbV+FEuqO8ygIoq6sb0Y6NIngoh+QMV9pq/ V/jVXeDmbuc6ojvmVVW94MLADpV6esZS0LP/DE/zIyhCVp2ModDofHHXS2PxnVRYsS6cYf1 OU8JNnUYAvKJO7k/9KchpMLifVa9gjk5yuTg8BfRrhzbCe7vP7RGYvkFsy7fHkcD+UB5jCM oRaxWqPrShksrK0XZ2q4g3oNNUVvSvdMPb29OJtyRzxJVWVpBPbXoH1Aep8fRTSkte+Xrom rgnGdf3xjscdjg+5cMVDZA/lF5kYw15lL/GQpoVVFW4AoTA5R9Ls/+yaiUpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1771033595; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=hLRwpTkfx1kXRw6E8llKpCVwNfPhmM+rcIituWmB3fk=; b=RYAbfEhtY6+g3ZXmRXN9WGpThuxdE9KwTMtkwW1u+6Os6oM6/0llytvigI2BZmZd3vXob AOnujISZ8cN+uGlrLOoNNGypaSvfd9S6ZAP8Et140ejGnY1sqUOQCrtyriTcYJZ52BxPH5/ 6uokFRZdopqej66kJihu2zIkzXO+PFYPnZ3esOMDPdjTO+qheHYaHrX//Q2tpUSSRDUciGe C5rRGXdb/TZgPYPlVi0aUdWYEgULjIXUBV/QA2g7Y7vhmbk7lDwT2iid42hczYGe5rKGGmF eiXUV5Ho2VIZwj4KXs+V8fU1dy7b0matv2btAVh/+f8UEkTduNWT+nFRVZHg== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1771033587; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=2bThEGMfq3mI1S1TtMNjAU/kOPgM6zZe7idnOaF9mJY=; b=iCyE45Gck+PqrLWXow8sRZrpYaOdCcHXWCakqbJyKqHhM0lJAN9TWD8Fo+NG0VNc9i3hN h7IIJJ+lSrSz1iOPzYR/eCHbMFAdafrn0KBHZyszD/m/Qc6UaGJTPGIIRCl6B0/3/b1jWKi cc9E9DtV9wlUUnRGLq4uoqZMajfkl3vWclbl0pW2jYXCc111BWLqE7TS2fdi4If1oWPSEMh 5t7S8qCKxXFwyhJM05Y7vEKQvC16RXxf82unCH1I1BpKkZra8parU2rGEXJIY8quwx57O2l j/AAMRBnEJmFVk9Dm+X30y9xGvRnoTOy1Hm6fhBaCBZIxIr3idwSPD30GJ7A== Received: from c8d966988b92 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 8F180691118 for ; Sat, 14 Feb 2026 03:46:27 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Sat, 14 Feb 2026 01:46:27 -0000 Message-ID: <177103358770.25.3703635996175708339@009cbcb3d8cd> Message-ID-Hash: IA4MLOQS4TMO7WCJ5FQQOHUA6AWXBHPO X-Message-ID-Hash: IA4MLOQS4TMO7WCJ5FQQOHUA6AWXBHPO X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PR] avcodec/snowenc: avoid NULL ptr arithmetic (PR #21752) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: michaelni via ffmpeg-devel Cc: michaelni Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21752 opened by michaelni URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21752 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21752.patch Fixes: applying non-zero offset 16 to null pointer Fixes: 471614378/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5967030642868224 Note: FF_PTR_ADD() does not work as this code has NULL + 123 cases where the pointer is unsused afterwards Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer >>From c1c24d8077fe6e8c9e046ea93e9bfe01aed6001b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 14 Feb 2026 01:23:34 +0100 Subject: [PATCH] avcodec/snowenc: avoid NULL ptr arithmetic Fixes: applying non-zero offset 16 to null pointer Fixes: 471614378/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SNOW_fuzzer-5967030642868224 Note: FF_PTR_ADD() does not work as this code has NULL + 123 cases where the pointer is unsused afterwards Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/snowenc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 20a41f11a4..8d28c48b00 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -397,9 +397,10 @@ static int encode_q_branch(SnowEncContext *enc, int level, int x, int y) int l,cr,cb; const int stride= s->current_picture->linesize[0]; const int uvstride= s->current_picture->linesize[1]; +#define PTR_ADD(ptr, off) ((ptr) ? (ptr) + (off) : NULL) const uint8_t *const current_data[3] = { s->input_picture->data[0] + (x + y* stride)*block_w, - s->input_picture->data[1] + ((x*block_w)>>s->chroma_h_shift) + ((y*uvstride*block_w)>>s->chroma_v_shift), - s->input_picture->data[2] + ((x*block_w)>>s->chroma_h_shift) + ((y*uvstride*block_w)>>s->chroma_v_shift)}; + PTR_ADD(s->input_picture->data[1], ((x*block_w)>>s->chroma_h_shift) + ((y*uvstride*block_w)>>s->chroma_v_shift)), + PTR_ADD(s->input_picture->data[2], ((x*block_w)>>s->chroma_h_shift) + ((y*uvstride*block_w)>>s->chroma_v_shift))}; int P[10][2]; int16_t last_mv[3][2]; int qpel= !!(s->avctx->flags & AV_CODEC_FLAG_QPEL); //unused -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org