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 552974D915 for ; Thu, 3 Jul 2025 02:02:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 18AE068E516; Thu, 3 Jul 2025 05:01:43 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 3531668E515 for ; Thu, 3 Jul 2025 05:01:36 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 8145D43A13 for ; Thu, 3 Jul 2025 02:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1751508095; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S84yFSp9bAH5Pk+W0fhURs11QbFuhx1zamdR5Ol/ODw=; b=gjHpw+/MgJHqL3QHeEitQ3c93tPqjHCbi4tZFMMW1jX6e8gOKiz/daAt27maGViYa/NNSx Dkf2YUMdn4GJHE6Y1bib5WixvQXccdwIiz4OJsdg4pn/neG0yf4f2ni8EaAQnR5LtOdhv0 /A0K7+23IRRijLmyWrPlnmSFxN2qMiVQlsLw4fFGot9T5HoKhG6O0C1pg1Rq8MX3u/1l0X zP/rXuCcn3eKon6WHeHzOl6K0He72LCPzFeq5873Cf/h79nO66cqYuTl96UsHeYekQ34v0 lw2AsM2JmRtdZA7ehisISbvfK9DCLBCXnVxYA5TymcVD0eUKDlI6nfXko+Ra3g== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 3 Jul 2025 04:01:29 +0200 Message-ID: <20250703020131.2506428-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250703020131.2506428-1-michael@niedermayer.cc> References: <20250703020131.2506428-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdduledtvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepgeejhfetgefhgfeludegvdduvdffgeefvddtheetlefhueeitdevffevfeehhefgnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieeirddvvdejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieeirddvvdejpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 3/5] avcodec/get_bits: Use FF_PTR_ADD() in init_get_bits() 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: NULL + 0 Fixes: 421817631/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APV_fuzzer-4957386534354944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/get_bits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index 19542965697..bf6929aa65d 100644 --- a/libavcodec/get_bits.h +++ b/libavcodec/get_bits.h @@ -511,7 +511,7 @@ static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer, s->buffer = buffer; s->size_in_bits = bit_size; s->size_in_bits_plus8 = bit_size + 8; - s->buffer_end = buffer + buffer_size; + s->buffer_end = buffer_size ? buffer + buffer_size : buffer; s->index = 0; return ret; -- 2.49.0 _______________________________________________ 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".