changeset 4106:75d1366e43a4

Automated merge with ssh://hg.atheme.org//hg/audacious
author William Pitcock <nenolod@atheme.org>
date Mon, 24 Dec 2007 23:05:33 -0600
parents 0d300e0b0001 (current diff) 7b01df6730eb (diff)
children db3f9b548226
files
diffstat 9 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/formatter.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/audacious/formatter.c	Mon Dec 24 23:05:33 2007 -0600
@@ -126,7 +126,7 @@
     for (p = format, q = buffer; *p; p++)
         if (*p == '%') {
             if (formatter->values[(int) *++p]) {
-                strcpy(q, formatter->values[(int) *p]);
+                g_strlcpy(q, formatter->values[(int) *p], len - 1);
                 q += strlen(q);
             }
             else {
--- a/src/audacious/intl/localcharset.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/audacious/intl/localcharset.c	Mon Dec 24 23:05:33 2007 -0600
@@ -186,8 +186,8 @@
 		  res_size = 0;
 		  break;
 		}
-	      strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
-	      strcpy (res_ptr + res_size - (l2 + 1), buf2);
+	      g_strlcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1, res_size - (l2 + 1));
+	      g_strlcpy (res_ptr + res_size - (l2 + 1), buf2, res_size - (l1 + 1));
 	    }
 	  fclose (fp);
 	  if (res_size == 0)
--- a/src/audacious/intl/log.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/audacious/intl/log.c	Mon Dec 24 23:05:33 2007 -0600
@@ -81,7 +81,7 @@
       last_logfilename = (char *) malloc (strlen (logfilename) + 1);
       if (last_logfilename == NULL)
 	return;
-      strcpy (last_logfilename, logfilename);
+      g_strlcpy (last_logfilename, logfilename, strlen(logfilename) + 1);
       last_logfile = fopen (logfilename, "a");
       if (last_logfile == NULL)
 	return;
--- a/src/audacious/intl/os2compat.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/audacious/intl/os2compat.c	Mon Dec 24 23:05:33 2007 -0600
@@ -94,5 +94,5 @@
     }
 
   if (strlen (_nlos2_localedir) <= MAXPATHLEN)
-    strcpy (libintl_nl_default_dirname, _nlos2_localedir);
+    g_strlcpy (libintl_nl_default_dirname, _nlos2_localedir, MAXPATHLEN + 1);
 }
--- a/src/audacious/intl/relocatable.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/audacious/intl/relocatable.c	Mon Dec 24 23:05:33 2007 -0600
@@ -427,7 +427,7 @@
 #endif
 	    {
 	      memcpy (result, curr_prefix, curr_prefix_len);
-	      strcpy (result + curr_prefix_len, pathname_tail);
+	      g_strlcpy (result + curr_prefix_len, pathname_tail, strlen(pathname_tail) + 1);
 	      return result;
 	    }
 	}
--- a/src/audacious/main.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/audacious/main.c	Mon Dec 24 23:05:33 2007 -0600
@@ -679,6 +679,10 @@
     /* at least one of these should be true */
     if ((!cfg.get_info_on_demand) && (!cfg.get_info_on_load))
         cfg.get_info_on_demand = TRUE;
+
+    /* playlist width and height can't be smaller than minimum */
+    cfg.playlist_width = MAX(cfg.playlist_width, PLAYLISTWIN_MIN_WIDTH);
+    cfg.playlist_height = MAX(cfg.playlist_height, PLAYLISTWIN_MIN_HEIGHT);
 }
 
 static gboolean
--- a/src/audacious/tuple_compiler.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/audacious/tuple_compiler.c	Mon Dec 24 23:05:33 2007 -0600
@@ -805,7 +805,7 @@
         *resmax = *reslen + MIN_ALLOC_BUF;
         *res = g_malloc(*resmax);
         
-        strcpy(*res, str);
+        g_strlcpy(*res, str, *resmax);
       }
     }
     
--- a/src/audacious/ui_equalizer.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/audacious/ui_equalizer.c	Mon Dec 24 23:05:33 2007 -0600
@@ -1094,7 +1094,7 @@
     vfs_fwrite("Winamp EQ library file v1.1\x1a!--", 1, 31, file);
 
     memset(name, 0, 257);
-    strcpy(name, "Entry1");
+    g_strlcpy(name, "Entry1", 257);
     vfs_fwrite(name, 1, 257, file);
 
     for (i = 0; i < 10; i++)
--- a/src/libid3tag/field.c	Mon Dec 24 23:05:10 2007 -0600
+++ b/src/libid3tag/field.c	Mon Dec 24 23:05:33 2007 -0600
@@ -78,11 +78,11 @@
     break;
 
   case ID3_FIELD_TYPE_LANGUAGE:
-    strcpy(field->immediate.value, "XXX");
+    g_strlcpy(field->immediate.value, "XXX", sizeof(field->immediate.value));
     break;
 
   case ID3_FIELD_TYPE_FRAMEID:
-    strcpy(field->immediate.value, "XXXX");
+    g_strlcpy(field->immediate.value, "XXXX", sizeof(field->immediate.value));
     break;
 
   case ID3_FIELD_TYPE_DATE:
@@ -671,7 +671,7 @@
     if (strlen(language) != 3)
       return -1;
 
-    strcpy(field->immediate.value, language);
+    g_strlcpy(field->immediate.value, language, sizeof(field->immediate.value));
   }
 
   return 0;