[Ffmpeg-cvslog] CVS: ffmpeg ffserver.c,1.96,1.97
Alex Beregszaszi
alex
Sun Nov 13 02:41:03 CET 2005
Update of /cvsroot/ffmpeg/ffmpeg
In directory mail:/var2/tmp/cvs-serv14361
Modified Files:
ffserver.c
Log Message:
Support Launch when BindAddress is not INADDR_ANY or localhost. Also fix a possible buffer overflow
Index: ffserver.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/ffserver.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- ffserver.c 14 Oct 2005 17:29:00 -0000 1.96
+++ ffserver.c 13 Nov 2005 01:41:01 -0000 1.97
@@ -3868,8 +3868,11 @@
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) {
More information about the ffmpeg-cvslog
mailing list