[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Coverity fix for games/snake



----------------------------8<----------------------------
Coverty CID 1457

Index: snscore.c
===================================================================
RCS file: /cvs/src/games/snake/snscore.c,v
retrieving revision 1.5
diff -u -r1.5 snscore.c
--- snscore.c	10 Jul 2004 07:26:24 -0000	1.5
+++ snscore.c	22 Mar 2006 15:12:36 -0000
@@ -89,7 +89,7 @@
 		if (read(fd, &score, sizeof(short)) == 0)
 			break;
 		if (score > 0) {
-			if (noplayers > MAXPLAYERS)
+			if (noplayers >= MAXPLAYERS)
 				errx(2, "Too many entries in scorefile!");
 			players[noplayers].uids = uid;
 			players[noplayers].scores = score;

----------------------------8<----------------------------

Cheers,
Jasper

--
Humppa is a serious thing!

[demime 1.01d removed an attachment of type application/pgp-signature]



Visit your host, monkey.org