[ioquake3] 42/59: [code/botlib/l_precomp.c] Fix string buffer overflow
Simon McVittie
smcv at debian.org
Wed Sep 21 19:57:08 UTC 2016
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch debian/master
in repository ioquake3.
commit 90f2f02c55af937f83cacfdcd4188ea6359ddaa0
Author: Thomas Köppe <tkoeppe at google.com>
Date: Tue Sep 13 13:36:15 2016 +0100
[code/botlib/l_precomp.c] Fix string buffer overflow
---
code/botlib/l_precomp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/botlib/l_precomp.c b/code/botlib/l_precomp.c
index c0870db..4414f4c 100644
--- a/code/botlib/l_precomp.c
+++ b/code/botlib/l_precomp.c
@@ -1323,7 +1323,7 @@ define_t *PC_DefineFromString(char *string)
script = LoadScriptMemory(string, strlen(string), "*extern");
//create a new source
Com_Memset(&src, 0, sizeof(source_t));
- strncpy(src.filename, "*extern", MAX_PATH);
+ strncpy(src.filename, "*extern", sizeof(src.filename) - 1);
src.scriptstack = script;
#if DEFINEHASHING
src.definehash = GetClearedMemory(DEFINEHASHSIZE * sizeof(define_t *));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git
More information about the Pkg-games-commits
mailing list