]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
In Nicks_CompleteCountPossible, use MAX_SCOREBOARDNAME for buffer size
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 27 Jun 2020 02:27:20 +0000 (02:27 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 27 Jun 2020 02:27:20 +0000 (02:27 +0000)
Prevents potential buffer overflow.

Fix by terencehill

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12738 d7cf8633-e32d-0410-b094-e92efae38249

console.c

index 72563d25757a275a6075055996acf22f9c4fd878..637599c09385188cbb5e685fcc184d8e7578b1f1 100644 (file)
--- a/console.c
+++ b/console.c
@@ -2427,7 +2427,7 @@ static int Nicks_strncasecmp(char *a, char *b, unsigned int a_len)
  */
 static int Nicks_CompleteCountPossible(char *line, int pos, char *s, qboolean isCon)
 {
-       char name[128];
+       char name[MAX_SCOREBOARDNAME];
        int i, p;
        int match;
        int spos;