Module Name: src
Committed By: dholland
Date: Thu Jun 4 05:51:12 UTC 2009
Modified Files:
src/games/gomoku: stoc.c
Log Message:
sprintf -> snprintf
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/games/gomoku/stoc.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/gomoku/stoc.c
diff -u src/games/gomoku/stoc.c:1.10 src/games/gomoku/stoc.c:1.11
--- src/games/gomoku/stoc.c:1.10 Thu Jun 4 05:27:04 2009
+++ src/games/gomoku/stoc.c Thu Jun 4 05:51:12 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: stoc.c,v 1.10 2009/06/04 05:27:04 dholland Exp $ */
+/* $NetBSD: stoc.c,v 1.11 2009/06/04 05:51:12 dholland Exp $ */
/*
* Copyright (c) 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)stoc.c 8.1 (Berkeley) 7/24/94";
#else
-__RCSID("$NetBSD: stoc.c,v 1.10 2009/06/04 05:27:04 dholland Exp $");
+__RCSID("$NetBSD: stoc.c,v 1.11 2009/06/04 05:51:12 dholland Exp $");
#endif
#endif /* not lint */
@@ -71,7 +71,7 @@
for (i = 0; mv[i].m_code >= 0; i++)
if (s == mv[i].m_code)
return(mv[i].m_text);
- sprintf(buf, "%c%d", letters[s % BSZ1], s / BSZ1);
+ snprintf(buf, sizeof(buf), "%c%d", letters[s % BSZ1], s / BSZ1);
return(buf);
}