From patchwork Tue May 16 00:49:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 41638 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:ba91:b0:105:feb:71f2 with SMTP id fb17csp61294pzb; Mon, 15 May 2023 17:49:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ624x25Zh2yd87JEcg/FHcDaQCH0Q3h3G0FwtRhytZnfk7+YXqfoeUrG2BLMdq+9Qbz9pam X-Received: by 2002:a17:907:8a16:b0:96a:2cd7:5085 with SMTP id sc22-20020a1709078a1600b0096a2cd75085mr20507736ejc.44.1684198172097; Mon, 15 May 2023 17:49:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684198172; cv=none; d=google.com; s=arc-20160816; b=A3bmXnt5R0ph/5oGhN3HSAsXw17m7dVpnGUgdirmLNmD4hgSwk9XQl2S4DxbkcvJSW quI/QTsJj675tzqpDX03AfCcFAlUC8w8dVaDrQTyTwLF0SrfAxA1Q5XYvNVTbqZ+nDCy WebAJTw9/fbetSW4Vq4+O7LFv0Jhs7NLdMefjGIH8o36YH57Zbt4FmV1IoIq1sLHsnMn Tl9ms+iRpUXRkW97n0RWLKBgipK1X5ubFlL0DfWKe8Bh4YNdvH/MWkVPeMhGuIQ3FU0b LTjj1voQgnLmRtwK+i/xmsGNaJfip/2TegpnjboQVAyxKcx7l4I4waVMB3aW3tEzb5+i xmQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=KWX93v/ZxWTNreEjYF/EDgecuADC8mKKKExoDA4PZrE=; b=u3jXbUKfaoZuSBnMWBTI7Np48zlXSNrZqnlVeRMLLzPCfeUhWBGNzaWJuCn8TXj11j lVh7JklSVACOGD0/ZCjWEM7TCPAD+e4NOEk0S+RGkMzSlw/3pPMkpoONGT6qhbMaThk5 MlyJquGp45XitH9fX2VCl5m8BVp9LgUx7+2zJ+U1TmULcEuHfNeh/IgBf4P//N+u+3h6 /01AExAeyxeBtG5guqptHBUUT1HKChaklgfj5Z0vWUbwK0GRspw4iNWSh694HSyPIvSp VrI9XSM1fRUVfGkNPzGt53e+cPHV9Tfq1c/yfrR2uLr3CRS+u61qbyv3+qxW9AJUqDCS mAmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id d23-20020aa7ce17000000b00506b24cf626si13244066edv.82.2023.05.15.17.49.31; Mon, 15 May 2023 17:49:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8502868BF1E; Tue, 16 May 2023 03:49:26 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2910168BFA5 for ; Tue, 16 May 2023 03:49:19 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 150BEE0004 for ; Tue, 16 May 2023 00:49:18 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 16 May 2023 02:49:15 +0200 Message-Id: <20230516004918.13505-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 1/4] avformat/format: Remove redundant FFMIN() in ff_match_url_ext() 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: LcpDl9l1SqfO Found-by: Leo Izen Signed-off-by: Michael Niedermayer --- libavformat/format.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/format.c b/libavformat/format.c index d9135854de..c91f71057a 100644 --- a/libavformat/format.c +++ b/libavformat/format.c @@ -70,7 +70,7 @@ int ff_match_url_ext(const char *url, const char *extensions) return 0; if (uc.query - ext > sizeof(scratchpad)) return AVERROR(ENOMEM); //not enough memory in our scratchpad - av_strlcpy(scratchpad, ext + 1, FFMIN(sizeof(scratchpad), uc.query - ext)); + av_strlcpy(scratchpad, ext + 1, uc.query - ext); return av_match_name(scratchpad, extensions); }