git.videolan.org
/
ffmpeg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'qatar/master'
[ffmpeg.git]
/
libavformat
/
tcp.c
diff --git
a/libavformat/tcp.c
b/libavformat/tcp.c
index
70a5015
..
8cd217b
100644
(file)
--- a/
libavformat/tcp.c
+++ b/
libavformat/tcp.c
@@
-49,9
+49,12
@@
static int tcp_open(URLContext *h, const char *uri, int flags)
av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
&port, path, sizeof(path), uri);
av_url_split(proto, sizeof(proto), NULL, 0, hostname, sizeof(hostname),
&port, path, sizeof(path), uri);
- if (strcmp(proto,
"tcp") || port <= 0 || port >= 65536
)
+ if (strcmp(proto,
"tcp")
)
return AVERROR(EINVAL);
return AVERROR(EINVAL);
-
+ if (port <= 0 || port >= 65536) {
+ av_log(h, AV_LOG_ERROR, "Port missing in uri\n");
+ return AVERROR(EINVAL);
+ }
p = strchr(uri, '?');
if (p) {
if (av_find_info_tag(buf, sizeof(buf), "listen", p))
p = strchr(uri, '?');
if (p) {
if (av_find_info_tag(buf, sizeof(buf), "listen", p))