# HG changeset patch # User William Pitcock # Date 1198559133 21600 # Node ID 75d1366e43a41037764617b2e0b16ba67a86a40b # Parent 0d300e0b00012e8d6b212f6b05560b1675471fad# Parent 7b01df6730eb3193e1a47b1a5464a31efb5a6439 Automated merge with ssh://hg.atheme.org//hg/audacious diff -r 0d300e0b0001 -r 75d1366e43a4 src/audacious/formatter.c --- 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 { diff -r 0d300e0b0001 -r 75d1366e43a4 src/audacious/intl/localcharset.c --- 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) diff -r 0d300e0b0001 -r 75d1366e43a4 src/audacious/intl/log.c --- 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; diff -r 0d300e0b0001 -r 75d1366e43a4 src/audacious/intl/os2compat.c --- 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); } diff -r 0d300e0b0001 -r 75d1366e43a4 src/audacious/intl/relocatable.c --- 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; } } diff -r 0d300e0b0001 -r 75d1366e43a4 src/audacious/main.c --- 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 diff -r 0d300e0b0001 -r 75d1366e43a4 src/audacious/tuple_compiler.c --- 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); } } diff -r 0d300e0b0001 -r 75d1366e43a4 src/audacious/ui_equalizer.c --- 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++) diff -r 0d300e0b0001 -r 75d1366e43a4 src/libid3tag/field.c --- 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;