Index: kdegames/kbackgammon/kbgstatus.cpp
diff -u kdegames/kbackgammon/kbgstatus.cpp:1.5 kdegames/kbackgammon/kbgstatus.cpp:1.5.2.1
--- kdegames/kbackgammon/kbgstatus.cpp:1.5	Wed May  2 06:59:59 2001
+++ kdegames/kbackgammon/kbgstatus.cpp	Fri Dec  6 13:45:03 2002
@@ -46,7 +49,7 @@
 	/*
 	 * This is the format string from hell...
 	 */
-	const char *format = ("%*[^:]%*[:]%[^:]%*[:]%[^:]%*[:]%i%*[:]%i%*[:]%i%*[:]"
+	const char *format = ("%*[^:]%*[:]%99[^:]%*[:]%99[^:]%*[:]%i%*[:]%i%*[:]%i%*[:]"
 			      "%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]" 
 			      "%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]"
 			      "%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]%i%*[:]"
Index: kdegames/kbackgammon/engines/fibs/kbgfibs.cpp
diff -u kdegames/kbackgammon/engines/fibs/kbgfibs.cpp:1.8 kdegames/kbackgammon/engines/fibs/kbgfibs.cpp:1.8.2.1
--- kdegames/kbackgammon/engines/fibs/kbgfibs.cpp:1.8	Fri Jun 22 20:50:24 2001
+++ kdegames/kbackgammon/engines/fibs/kbgfibs.cpp	Fri Dec  6 13:26:32 2002
@@ -402,7 +402,7 @@
 	 * Extract the name of the player, her opponent, rating and experience.
 	 * It is okay to use latin1(), since the string is coming from FIBS.
 	 */
-	sscanf(info.latin1(), "%s %s %*s %*s %*s %f %i %*s %*s %*s %*s %*s", 
+	sscanf(info.latin1(), "%99s %99s %*s %*s %*s %f %i %*s %*s %*s %*s %*s", 
 	       name_p, name_o, &rate, &expi);
 
 	QString name = name_p;
@@ -1419,7 +1419,7 @@
 		char p[3][256];
 		time_t tmp;
 		// Using latin1() is okay, since the string comes from FIBS.
-		int words = sscanf (line.latin1(), "%s%s%li%s", p[0], p[1], &tmp, p[2]);
+		int words = sscanf (line.latin1(), "%255s%255s%li%255s", p[0], p[1], &tmp, p[2]);
 		if (words >= 4) {
 			QDateTime d; d.setTime_t(tmp);
 			QString text = i18n("%1, last logged in from %2 at %3.").arg(p[1]).arg(p[2]).arg(d.toString());
@@ -1469,7 +1469,7 @@
 		double rating;    
 		
 		// Using latin1() is okay, since the string comes from FIBS.
-		int words = sscanf (line.latin1(), "%s%s%i%i%i%i%i%i%i%i%i%i%i%i%i%lf%i%i%i%i%i%s", 
+		int words = sscanf (line.latin1(), "%255s%255s%i%i%i%i%i%i%i%i%i%i%i%i%i%lf%i%i%i%i%i%255s", 
 				    p[0], p[1], 
 				    &fibsOptions[OptAllowPip], 
 				    &n[0], 
Index: kdegames/kbackgammon/engines/fibs/kplayerlist.cpp
diff -u kdegames/kbackgammon/engines/fibs/kplayerlist.cpp:1.6 kdegames/kbackgammon/engines/fibs/kplayerlist.cpp:1.6.2.1
--- kdegames/kbackgammon/engines/fibs/kplayerlist.cpp:1.6	Tue Jun 19 07:15:44 2001
+++ kdegames/kbackgammon/engines/fibs/kplayerlist.cpp	Fri Dec  6 13:26:32 2002
@@ -616,7 +616,7 @@
 	entry[Status][0] = '\0';
 
 	// the line comes from FIBS and is 7 bit ASCII
-	sscanf(line.latin1(), "%s %s %s %s %s %s %s %s %s %s %s %s", entry[Player], entry[Opponent], 
+	sscanf(line.latin1(), "%99s %99s %99s %1s %1s %99s %99s %99s %99s %99s %99s %99s", entry[Player], entry[Opponent], 
 	       entry[Watches], ready, away, entry[Rating], entry[Experience], entry[Idle], entry[Time], 
 	       entry[Host], entry[Client], entry[Email]);
 	
Index: kdegames/kmahjongg/HighScore.cpp
diff -u kdegames/kmahjongg/HighScore.cpp:1.5 kdegames/kmahjongg/HighScore.cpp:1.5.2.1
--- kdegames/kmahjongg/HighScore.cpp:1.5	Thu Mar  8 18:40:44 2001
+++ kdegames/kmahjongg/HighScore.cpp	Fri Dec  6 15:09:12 2002
@@ -208,7 +208,7 @@
 		goto error;	
 
 	// check magic
- 	fscanf(fp, "%s\n", buff);
+ 	fscanf(fp, "%1023s\n", buff);
 	if (highScoreMagic1_1 != buff) {
 		goto error;	
 	}
Index: kdegames/kmahjongg/kmahjongg.cpp
diff -u kdegames/kmahjongg/kmahjongg.cpp:1.58.2.1 kdegames/kmahjongg/kmahjongg.cpp:1.58.2.2
--- kdegames/kmahjongg/kmahjongg.cpp:1.58.2.1	Thu Sep 13 23:31:09 2001
+++ kdegames/kmahjongg/kmahjongg.cpp	Fri Dec  6 15:09:12 2002
@@ -774,7 +774,7 @@
     }
 
     // verify the magic
-    fscanf(outFile, "%s\n", buffer);
+    fscanf(outFile, "%1023s\n", buffer);
     if (buffer != gameMagic) {
 	KMessageBox::sorry(this,
 		i18n("File format not recognised."));
@@ -783,7 +783,7 @@
     }
 
     //ed the elapsed time
-    fscanf(outFile, "%s\n", buffer);
+    fscanf(outFile, "%1023s\n", buffer);
     gameTimer->fromString(buffer);
 
     // suck out all the game data
Index: kdegames/kreversi/app.cpp
diff -u kdegames/kreversi/app.cpp:1.38 kdegames/kreversi/app.cpp:1.38.2.1
--- kdegames/kreversi/app.cpp:1.38	Mon Jul  2 08:24:28 2001
+++ kdegames/kreversi/app.cpp	Fri Dec  6 14:06:30 2002
@@ -804,8 +804,8 @@
       highscore.resize(i+1);
 
       HighScore hs;
-      sscanf((const char *)e.utf8(), "%s %d %d %d %f %ld", 
-	     (char *)&hs.name, &hs.color, &hs.winner, 
+      sscanf( e.utf8(), "%31s %d %d %d %f %ld",
+	     hs.name, &hs.color, &hs.winner,
 	     &hs.loser, &hs.rating, &hs.date);
       highscore[i] = hs;
     } else
