Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37709759
en ru br
ALT Linux repos
S:0.52-alt7
5.0: 0.52-alt5
4.1: 0.52-alt3
4.0: 0.52-alt3

Group :: Games/Other
RPM: netris

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: netris-openbsd-src-snprintf.patch
Download


$OpenBSD: patch-game_c,v 1.1 2004/03/03 22:51:00 xsa Exp $
--- game.c.orig	2003-08-13 03:33:02.000000000 +0200
+++ game.c	2004-03-03 15:53:32.000000000 +0100
@@ -58,11 +58,11 @@ ExtFunc void MapKeys(char *newKeys)
 		ch = (unsigned char) keyTable[k];
 		if (used[ch]) {
 			if (iscntrl(ch) && ch < ' ')
-				sprintf(scratch, "Ctrl-%c", ch + ('A' - 1));
+				snprintf(scratch, sizeof scratch, "Ctrl-%c", ch + ('A' - 1));
 			else if (isprint(ch))
-				sprintf(scratch, "\"%c\"", ch);
+				snprintf(scratch, sizeof scratch, "\"%c\"", ch);
 			else
-				sprintf(scratch, "0x%X", ch);
+				snprintf(scratch, sizeof scratch, "0x%X", ch);
 			if (!errs)
 				fprintf(stderr, "Duplicate key mappings:\n");
 			errs++;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin