Mercurial > audlegacy
changeset 2607:65543c999c7e trunk
[svn] Check filesize before doing memcmp (potential sigsegv).
author | hansmi |
---|---|
date | Mon, 05 Mar 2007 13:43:09 -0800 |
parents | 7c19bb5516db |
children | f4fa6b295b43 |
files | ChangeLog src/audacious/build_stamp.c src/audacious/util.c |
diffstat | 3 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Mar 04 10:43:38 2007 -0800 +++ b/ChangeLog Mon Mar 05 13:43:09 2007 -0800 @@ -1,3 +1,12 @@ +2007-03-04 18:43:38 +0000 Michael Farber <01mf02@gmail.com> + revision [4222] + - Removed some of the horrible code duplication in the file popup code + + + trunk/src/audacious/ui_fileinfopopup.c | 593 +++++++++++++++------------------ + 1 file changed, 271 insertions(+), 322 deletions(-) + + 2007-03-04 06:34:27 +0000 William Pitcock <nenolod@sacredspiral.co.uk> revision [4220] - fix handling of multiple files on the command line.
--- a/src/audacious/build_stamp.c Sun Mar 04 10:43:38 2007 -0800 +++ b/src/audacious/build_stamp.c Mon Mar 05 13:43:09 2007 -0800 @@ -1,2 +1,2 @@ #include <glib.h> -const gchar *svn_stamp = "20070304-4220"; +const gchar *svn_stamp = "20070304-4222";
--- a/src/audacious/util.c Sun Mar 04 10:43:38 2007 -0800 +++ b/src/audacious/util.c Mon Mar 05 13:43:09 2007 -0800 @@ -420,7 +420,7 @@ * by incomp@#audacious. Cleanups \nenolod * FIXME: can't we use a GLib function for that? -- 01mf02 */ - if (!memcmp(&buffer[0],&x,2)) + if (filesize > 2 && !memcmp(&buffer[0],&x,2)) { gchar *outbuf = g_malloc (filesize); /* it's safe to waste memory. */ guint counter;