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 64DB8490F7 for ; Mon, 3 Jun 2024 02:16:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 034D968D68D; Mon, 3 Jun 2024 05:15:41 +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 1DE1E68D686 for ; Mon, 3 Jun 2024 05:15:33 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6B50220002 for ; Mon, 3 Jun 2024 02:15:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1717380932; 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=U2RWi1q4hAQQ0IXX+aOg5pVvU3SYBWrwPihbKaevqMw=; b=oARDjDbg3PiF4SI1aAeIZA5bKptwWSO+JYdQ9rjz9ONKnSaomYEwdgP7uIoaIu3fj+eCrV 7ox+TwJgmCxiQsAh6qlqVwZxB5fRDj5EorvsABi6DMxH94SXGMVRVTLuraP6VBFS+nBUDR uvudnZZ16rY9OIxUWanyn8Hr+O3DfZnn6IvHuNyDmu8YtuIX3/rzJSER1vn1uRDv/AwzKj ymmBaELpb4wpZZ+S3EdXAhtOoiSZlQSDlOxtFoN//LiR6YCmRJJW4SxA8Wq4rOAfFQiqhZ K0kmgCalx8ftDd+yLDF4bf8Qd3SAG4X6PjSGxzrgm9T9E8FpqjBbuv8D14lytw== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 3 Jun 2024 04:15:23 +0200 Message-ID: <20240603021526.2372698-6-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240603021526.2372698-1-michael@niedermayer.cc> References: <20240603021526.2372698-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 6/9] avformat/libzmq: Check av_strstart() 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: CID1453457 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavformat/libzmq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/libzmq.c b/libavformat/libzmq.c index 04c72ac601c..f4bb849e46b 100644 --- a/libavformat/libzmq.c +++ b/libavformat/libzmq.c @@ -94,7 +94,10 @@ static int zmq_proto_open(URLContext *h, const char *uri, int flags) return AVERROR_EXTERNAL; } - av_strstart(uri, "zmq:", &uri); + if (av_strstart(uri, "zmq:", &uri)) { + av_log(h, AV_LOG_ERROR, "URL %s lacks prefix\n", uri); + return AVERROR(EINVAL); + } /*publish during write*/ if (h->flags & AVIO_FLAG_WRITE) { -- 2.45.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".