eliot-dev
[Top][All Lists]
Advanced

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

[Eliot-dev] eliot/game game_io.cpp


From: Olivier Teulière
Subject: [Eliot-dev] eliot/game game_io.cpp
Date: Wed, 18 Mar 2009 18:53:57 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>       09/03/18 18:53:57

Modified files:
        game           : game_io.cpp 

Log message:
        Fixed a compilation warning (potential buffer overflow)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/game/game_io.cpp?cvsroot=eliot&r1=1.12&r2=1.13

Patches:
Index: game_io.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/game_io.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- game_io.cpp 23 Nov 2008 08:18:06 -0000      1.12
+++ game_io.cpp 18 Mar 2009 18:53:57 -0000      1.13
@@ -159,7 +159,7 @@
                 break;
 
             //debug("%s)", token);
-            strncat(pos, token, sizeof(pos));
+            strncat(pos, token, sizeof(pos) - strlen(pos) - 1);
 
             if ((ret = pGame->play(convertToWc(pos), convertToWc(word))))
             {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]