Sophie

Sophie

distrib > Mageia > 5 > i586 > by-pkgid > c92fd39013e0b650e571fd8b5bc55fb7 > files > 2

icebreaker-1.9.8-5.mga5.src.rpm

Index: icebreaker-1.9.7/menu.c
===================================================================
--- icebreaker-1.9.7/menu.c
+++ icebreaker-1.9.7/menu.c	2013-08-09 01:13:12.897193178 +0200
@@ -522,7 +522,7 @@
 		{ // "random", at the end/beginning of the list
 			
 			strncpy(val,"random",MAXMENUVALUELENGTH);
-			snprintf(options.theme,MAXMENUVALUELENGTH,"random");
+			snprintf(options.theme,MAXTHEMENAMELENGTH,"random");
 			
 			settheme("linux"); // just for pretty
 			
@@ -538,13 +538,13 @@
 			if (mbutton==1 || mbutton==4) // left click or scroll forwards
 			{
 				strncpy(val,themelist[(t+1)%themecount],MAXMENUVALUELENGTH);
-				snprintf(options.theme,MAXMENUVALUELENGTH,"%s",themelist[(t+1)%themecount]);
+				snprintf(options.theme,MAXTHEMENAMELENGTH,"%s",themelist[(t+1)%themecount]);
 			}
 			else // right or middle or scroll back
 			{
 				if (t<0) t=themecount;
 				strncpy(val,themelist[(t-1)%themecount],MAXMENUVALUELENGTH);
-				snprintf(options.theme,MAXMENUVALUELENGTH,"%s",themelist[(t-1)%themecount]);
+				snprintf(options.theme,MAXTHEMENAMELENGTH,"%s",themelist[(t-1)%themecount]);
 			}
 			
 			settheme(options.theme);
Index: icebreaker-1.9.7/themes.c
===================================================================
--- icebreaker-1.9.7/themes.c
+++ icebreaker-1.9.7/themes.c	2013-08-09 02:21:58.235810567 +0200
@@ -474,7 +474,7 @@
 
 int setrandomtheme()
 {
-	char themename[MAXTHEMENAMELENGTH];
+	char themename[MAXTHEMENAMELENGTH+1];
 	char** themelist;
 	int themecount;