Index: gnibbles/ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-games/gnibbles/ChangeLog,v
retrieving revision 1.137
diff -u -p -r1.137 ChangeLog
--- gnibbles/ChangeLog	15 Apr 2005 05:31:06 -0000	1.137
+++ gnibbles/ChangeLog	19 May 2005 17:45:29 -0000
@@ -1,3 +1,9 @@
+2005-05-19  Richard Hoelscher  <rah@rahga.com>
+
+	* gnibbles.c (gnibbles_load_level): Fix crashing problems found
+	in Fedora. When they use fgets, the buffer must be smaller than the
+	destination.
+
 2005-04-14  Richard Hoelscher  <rah@rahga.com>
 
 	* main.c (about_cb): In about dialog, use name from icon theme.
Index: gnibbles/gnibbles.c
===================================================================
RCS file: /cvs/gnome/gnome-games/gnibbles/gnibbles.c,v
retrieving revision 1.45
diff -u -p -r1.45 gnibbles.c
--- gnibbles/gnibbles.c	20 Sep 2004 07:59:39 -0000	1.45
+++ gnibbles/gnibbles.c	19 May 2005 17:45:29 -0000
@@ -219,7 +219,7 @@ gnibbles_load_level (GtkWidget *window, 
 	gchar *tmp = NULL;
 	gchar *filename;
 	FILE *in;
-	gchar tmpboard[BOARDWIDTH + 1];
+	gchar tmpboard[BOARDWIDTH + 2];
 	gint i, j;
 	gint count = 0;
 
@@ -247,7 +247,7 @@ gnibbles_load_level (GtkWidget *window, 
 	boni = gnibbles_boni_new ();
 
 	for (i = 0; i < BOARDHEIGHT; i++) {
-		fgets (tmpboard, 255, in);
+		fgets (tmpboard, sizeof(tmpboard), in);
 		for (j = 0; j < BOARDWIDTH; j++) {
 			board[j][i] = tmpboard[j];
 			switch (board[j][i]) {
