This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 40ec4c5988cb56aeb3bbfb5f4cf733b3e7fc6bfb
Author: m4n4t4...@gmail.com 
<m4n4t4...@gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Mon May 26 09:26:18 2014 +0000

    Fix potential buffer overflow in PS_ReadPrimitive
---
 MP/code/botlib/l_script.c | 2 +-
 SP/code/botlib/l_script.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MP/code/botlib/l_script.c b/MP/code/botlib/l_script.c
index 5b097fe..89d678e 100644
--- a/MP/code/botlib/l_script.c
+++ b/MP/code/botlib/l_script.c
@@ -835,7 +835,7 @@ int PS_ReadPrimitive( script_t *script, token_t *token ) {
        len = 0;
        while ( *script->script_p > ' ' && *script->script_p != ';' )
        {
-               if ( len >= MAX_TOKEN ) {
+               if ( len >= MAX_TOKEN - 1 ) {
                        ScriptError( script, "primitive token longer than 
MAX_TOKEN = %d", MAX_TOKEN );
                        return 0;
                } //end if
diff --git a/SP/code/botlib/l_script.c b/SP/code/botlib/l_script.c
index bb884f3..2b3c309 100644
--- a/SP/code/botlib/l_script.c
+++ b/SP/code/botlib/l_script.c
@@ -850,7 +850,7 @@ int PS_ReadPrimitive( script_t *script, token_t *token ) {
        len = 0;
        while ( *script->script_p > ' ' && *script->script_p != ';' )
        {
-               if ( len >= MAX_TOKEN ) {
+               if ( len >= MAX_TOKEN -1 ) {
                        ScriptError( script, "primitive token longer than 
MAX_TOKEN = %d", MAX_TOKEN );
                        return 0;
                } //end if

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/iortcw.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to