--- grip-3.3.1/src/rip.h.bak 2004-04-15 20:51:47.000000000 +0300 +++ grip-3.3.1/src/rip.h 2007-03-23 00:10:17.470841797 +0200 @@ -34,8 +34,8 @@ typedef struct _encode_track { char song_artist[256]; char disc_name[256]; char disc_artist[256]; - char wav_filename[256]; - char mp3_filename[256]; + char wav_filename[PATH_MAX]; + char mp3_filename[PATH_MAX]; int song_year; int id3_genre; int mins; --- grip-3.3.1/src/rip.c.bak 2005-06-25 21:00:55.000000000 +0300 +++ grip-3.3.1/src/rip.c 2007-03-23 01:46:18.057473078 +0200 @@ -355,7 +355,7 @@ static void DBScan(GtkWidget *widget,gpo TranslateString(ginfo->mp3fileformat,str,TranslateSwitch, &enc_track,TRUE,&(ginfo->sprefs)); - g_snprintf(enc_track.mp3_filename,256,"%s",str->str); + g_snprintf(enc_track.mp3_filename, sizeof(enc_track.mp3_filename), "%s", str->str); g_string_free(str,TRUE); AddSQLEntry(ginfo,&enc_track); @@ -499,7 +499,7 @@ gboolean CanWrite(char *path) void MakeDirs(char *path) { - char dir[256]; + char dir[PATH_MAX]; char *s; int len; @@ -1438,7 +1442,7 @@ static gboolean RipNextTrack(GripInfo *g conv_str=g_strdup(str->str); } - g_snprintf(ginfo->ripfile,256,"%s",conv_str); + g_snprintf(ginfo->ripfile, sizeof(ginfo->ripfile), "%s", conv_str); g_free(conv_str); g_string_free(str,TRUE); @@ -1708,7 +1714,7 @@ static gboolean MP3Encode(GripInfo *ginf if(!conv_str) conv_str=g_strdup(str->str); - g_snprintf(ginfo->mp3file[cpu],256,"%s",conv_str); + g_snprintf(ginfo->mp3file[cpu], sizeof(ginfo->mp3file[cpu]), "%s", conv_str); g_free(conv_str); g_string_free(str,TRUE);