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 5B6B549500 for ; Thu, 11 Jul 2024 23:35:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2B54068DBB8; Fri, 12 Jul 2024 02:34:32 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CDEA468DB41 for ; Fri, 12 Jul 2024 02:34:22 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 3C32C20005 for ; Thu, 11 Jul 2024 23:34:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720740862; 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=5NFy5ykPv5Empm3pZg78mTnsoIYE0ugCq1cxkfo8FZQ=; b=ZhaQ1wC/A5KQAIUo3H/KDnfx71q6G4gq8jDwjVicY0KboFWHNr0QfLg9F9dTfmqq8786Qv t3A3Og+DcfJLTTnsfXdvye0rx1ZZtHlZ5EESzvivjSbUs4bivbbeHj5zxoQOta19cjEX2/ iA3DplY+Yuj1tQC1taR2onjjjWfiQvqrZWDhFLqoQpGdYmbiIWS5X6iQRhF0YfcJtVFHAo hLqniWCENkdewSXOCtUwZa5Wbf0YKgjLou9oAEZjO95AeBo9aWt6aB+2Vb1ETMZGd4SO/D rXqbX3u+laCMPo75agJcIymqynomMrPBWb7e6HYglfhW+KK5MjsWlDG8lm15nw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 12 Jul 2024 01:34:00 +0200 Message-ID: <20240711233417.1896879-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240711233417.1896879-1-michael@niedermayer.cc> References: <20240711233417.1896879-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 06/22] avformat/mm: Check length 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: CID1220824 Overflowed constant Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mm.c b/libavformat/mm.c index 23c025d8525..e377ed4fbb9 100644 --- a/libavformat/mm.c +++ b/libavformat/mm.c @@ -95,7 +95,7 @@ static int read_header(AVFormatContext *s) type = avio_rl16(pb); length = avio_rl32(pb); - if (type != MM_TYPE_HEADER) + if (type != MM_TYPE_HEADER || length < 10) return AVERROR_INVALIDDATA; /* read header */ -- 2.45.2 _______________________________________________ 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".