diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2005-11-13 01:41:01 +0000 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2005-11-13 01:41:01 +0000 |
commit | 4b4f38e42e7b390f3e7f0489da746dbbc9f6bbba (patch) | |
tree | 41b0ec0793031c10d23a1319c74157d25758814b /ffserver.c | |
parent | 97246091a59ceae7c9f5556088e3535d36e850bc (diff) | |
download | ffmpeg-4b4f38e42e7b390f3e7f0489da746dbbc9f6bbba.tar.gz |
Support Launch when BindAddress is not INADDR_ANY or localhost. Also fix a possible buffer overflow
Originally committed as revision 4692 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffserver.c')
-rw-r--r-- | ffserver.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ffserver.c b/ffserver.c index 78db9be526..9d34419c76 100644 --- a/ffserver.c +++ b/ffserver.c @@ -3868,8 +3868,11 @@ static int parse_ffconfig(const char *filename) feed->child_argv[i] = av_malloc(30 + strlen(feed->filename)); - snprintf(feed->child_argv[i], 256, "http://127.0.0.1:%d/%s", - ntohs(my_http_addr.sin_port), feed->filename); + snprintf(feed->child_argv[i], 30+strlen(feed->filename), + "http://%s:%d/%s", + (my_http_addr.sin_addr.s_addr == INADDR_ANY) ? "127.0.0.1" : + inet_ntoa(my_http_addr.sin_addr), + ntohs(my_http_addr.sin_port), feed->filename); } } else if (!strcasecmp(cmd, "ReadOnlyFile")) { if (feed) { |