mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
avformat/udp: check for memory allocation failure when setting localaddr
Signed-off-by: jackarain <jack.wgm@gmail.com> Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
f758d4fcb9
commit
05ea0457fc
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user