From: <wi...@fr...> - 2005-07-04 14:12:58
|
CVS Root: /cvs/gstreamer Module: gst-plugins-base Changes by: wingo Date: Mon Jul 04 2005 07:12:54 PDT Log message: 2005-07-04 Andy Wingo <wi...@po...> * ext/gnomevfs/gstgnomevfssrc.c (gst_gnomevfssrc_received_headers_callback) (audiocast_thread_kill, audiocast_thread_run): FORTIFY fixen, hopefully. Modified files: . : ChangeLog ext/gnomevfs : gstgnomevfssrc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ChangeLog.diff?r1=1.1755&r2=1.1756 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-base/ext/gnomevfs/gstgnomevfssrc.c.diff?r1=1.67&r2=1.68 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-base/ChangeLog,v retrieving revision 1.1755 retrieving revision 1.1756 diff -u -d -r1.1755 -r1.1756 --- ChangeLog 4 Jul 2005 10:40:17 -0000 1.1755 +++ ChangeLog 4 Jul 2005 14:12:41 -0000 1.1756 @@ -1,5 +1,10 @@ 2005-07-04 Andy Wingo <wi...@po...> + * ext/gnomevfs/gstgnomevfssrc.c + (gst_gnomevfssrc_received_headers_callback) + (audiocast_thread_kill, audiocast_thread_run): FORTIFY fixen, + hopefully. + * gst/audioconvert/gstaudioconvert.c (gst_audio_convert_fixate): No refcount leakage. Index: gstgnomevfssrc.c RCS file: /cvs/gstreamer/gst-plugins-base/ext/gnomevfs/gstgnomevfssrc.c,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- gstgnomevfssrc.c 25 May 2005 11:59:39 -0000 1.67 +++ gstgnomevfssrc.c 4 Jul 2005 14:12:41 -0000 1.68 @@ -634,7 +634,8 @@ char buf[1]; GST_DEBUG ("audiocast thread: got die character"); - read (src->audiocast_thread_die_infd, buf, 1); + if (read (src->audiocast_thread_die_infd, buf, 1) != 1) + g_warning ("gnomevfssrc: could not read from audiocast fd"); close (src->audiocast_thread_die_infd); close (src->audiocast_fd); return NULL; @@ -732,7 +733,8 @@ audiocast metadata too. */ GST_DEBUG ("audiocast: writing die character"); - write (src->audiocast_thread_die_outfd, "q", 1); + if (write (src->audiocast_thread_die_outfd, "q", 1) != 1) + g_critical ("gnomevfssrc: could not write to audiocast thread fd"); close (src->audiocast_thread_die_outfd); GST_DEBUG ("audiocast: joining thread"); g_thread_join (src->audiocast_thread); @@ -785,13 +787,14 @@ continue; /* Icecast stuff */ - if (!strncmp (data, "icy-metaint:", 12)) { /* ugh */ - sscanf (data + 12, "%d", &icy_metaint); - src->icy_metaint = icy_metaint; - GST_DEBUG ("got icy-metaint %d, killing audiocast thread", - src->icy_metaint); - audiocast_thread_kill (src); - continue; + if (strncmp (data, "icy-metaint:", 12) == 0) { /* ugh */ + if (sscanf (data + 12, "%d", &icy_metaint) == 1) { + src->icy_metaint = icy_metaint; + GST_DEBUG ("got icy-metaint %d, killing audiocast thread", + src->icy_metaint); + audiocast_thread_kill (src); + continue; + } } if (!strncmp (data, "icy-", 4)) |