From: Thomas Debesse Date: Thu, 25 Feb 2021 14:30:55 +0000 (+0100) Subject: q3map2: better use strncpy instead of strcpy X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=5f13c09ff52552994f40d03bcdfcfb3f8e2b8259;p=xonotic%2Fnetradiant.git q3map2: better use strncpy instead of strcpy --- diff --git a/tools/quake3/common/vfs.c b/tools/quake3/common/vfs.c index 62881b5e..8f5e57bf 100644 --- a/tools/quake3/common/vfs.c +++ b/tools/quake3/common/vfs.c @@ -344,7 +344,7 @@ int vfsLoadFile( const char *filename, void **bufferptr, int index ){ } *bufferptr = NULL; - strcpy( fixed, filename ); + strncpy( fixed, filename, sizeof( fixed ) ); vfsFixDOSName( fixed ); lower = g_ascii_strdown( fixed, -1 );