changeset 2361:f24ae4f40e29 trunk

[svn] - security and warning fixes from ssommer@suse
author nenolod
date Thu, 18 Jan 2007 03:02:55 -0800
parents d2d296826b06
children 424bc51df918
files ChangeLog src/audacious/controlsocket.c src/audacious/util.c src/audacious/widgets/playlist_list.c src/libaudacious/beepctrl.c
diffstat 5 files changed, 32 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jan 18 01:46:30 2007 -0800
+++ b/ChangeLog	Thu Jan 18 03:02:55 2007 -0800
@@ -1,3 +1,12 @@
+2007-01-18 09:46:30 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [3730]
+  - Add GenericName and remove icon filename extension from .desktop file. 
+    Patch by ssommer. Closes #764.
+  
+  trunk/src/audacious/audacious.desktop.in |    3 ++-
+  1 file changed, 2 insertions(+), 1 deletion(-)
+
+
 2007-01-18 05:46:23 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [3728]
   - support for libmcs (pass --enable-mcs to configure)
--- a/src/audacious/controlsocket.c	Thu Jan 18 01:46:30 2007 -0800
+++ b/src/audacious/controlsocket.c	Thu Jan 18 03:02:55 2007 -0800
@@ -268,9 +268,16 @@
     pkthdr.version = XMMS_PROTOCOL_VERSION;
     pkthdr.data_length = length;
     if ((size_t)write(fd, &pkthdr, sizeof(ServerPktHeader)) < sizeof(pkthdr))
+    {
+        g_warning("ctrl_write_packet: failed to write packet header");
         return;
+    }
     if (data && length > 0)
-        write(fd, data, length);
+        if(length != write(fd, data, length))
+        {
+            g_warning("ctrl_write_packet: failed to write packet");
+            return;
+        }
 }
 
 static void
--- a/src/audacious/util.c	Thu Jan 18 01:46:30 2007 -0800
+++ b/src/audacious/util.c	Thu Jan 18 03:02:55 2007 -0800
@@ -304,7 +304,12 @@
         return NULL;
     }
 
-    system(cmd);
+    if(system(cmd) == -1)
+    {
+        g_message("could not execute cmd %s",cmd);
+        g_free(cmd);
+        return NULL;
+    }
     g_free(cmd);
 
     return tmpdir;
--- a/src/audacious/widgets/playlist_list.c	Thu Jan 18 01:46:30 2007 -0800
+++ b/src/audacious/widgets/playlist_list.c	Thu Jan 18 03:02:55 2007 -0800
@@ -676,7 +676,7 @@
                        entry->length / 60000, (entry->length / 1000) % 60);
         }
 
-        strncat(tail, length, sizeof(tail));
+        strncat(tail, length, sizeof(tail) - 1);
         tail_len = strlen(tail);
 
         max_time_len = MAX(max_time_len, tail_len);
--- a/src/libaudacious/beepctrl.c	Thu Jan 18 01:46:30 2007 -0800
+++ b/src/libaudacious/beepctrl.c	Thu Jan 18 03:02:55 2007 -0800
@@ -106,9 +106,16 @@
     pkt_hdr.command = command;
     pkt_hdr.data_length = data_length;
     if ((size_t)write(fd, &pkt_hdr, sizeof(ClientPktHeader)) < sizeof(pkt_hdr))
+    {
+        g_warning("remote_send_packet: failed to write packet header");
         return;
+    }
     if (data_length && data)
-        write(fd, data, data_length);
+        if( data_length != write(fd, data, data_length))
+        {
+            g_warning("remote_send_packet: failed to write packet");
+            return;
+        }
 }
 
 static void