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 B28BE450EE for ; Wed, 8 Mar 2023 22:44:45 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C25C068BD6E; Thu, 9 Mar 2023 00:44:43 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id C3B85689213 for ; Thu, 9 Mar 2023 00:44:36 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 09FD9E81AC for ; Wed, 8 Mar 2023 23:44:38 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k_3ZaCfg0Lid for ; Wed, 8 Mar 2023 23:44:35 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 220EAE812A for ; Wed, 8 Mar 2023 23:44:35 +0100 (CET) Date: Wed, 8 Mar 2023 23:44:35 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20230303123139.1107008-1-jack.wgm@gmail.com> Message-ID: References: <20230303123139.1107008-1-jack.wgm@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] libavforamt/udp: Memory allocation failure check 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, 3 Mar 2023, jackarain wrote: > Signed-off-by: jackarain > --- > libavformat/udp.c | 4 ++++ > 1 file changed, 4 insertions(+) Thanks, will apply. Regards, Marton > > diff --git a/libavformat/udp.c b/libavformat/udp.c > index e8980b29d8..909213a467 100644 > --- a/libavformat/udp.c > +++ b/libavformat/udp.c > @@ -740,6 +740,10 @@ static int udp_open(URLContext *h, const char *uri, int flags) > if (av_find_info_tag(buf, sizeof(buf), "localaddr", p)) { > av_freep(&s->localaddr); > s->localaddr = av_strdup(buf); > + if (!s->localaddr) { > + ret = AVERROR(ENOMEM); > + goto fail; > + } > } > if (av_find_info_tag(buf, sizeof(buf), "sources", p)) { > if ((ret = ff_ip_parse_sources(h, buf, &s->filters)) < 0) > -- > 2.39.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". > _______________________________________________ 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".