From 5f13c09ff52552994f40d03bcdfcfb3f8e2b8259 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Thu, 25 Feb 2021 15:30:55 +0100 Subject: [PATCH] q3map2: better use strncpy instead of strcpy --- tools/quake3/common/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); -- 2.39.2