From 29c8acf226421284bdcab8b97fc1be6ef5b0e873 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Sun, 13 Feb 2011 23:51:04 +0000 Subject: [PATCH] Prevent buffer overflow in pathnames constructor --- goldlib/gall/gfilutl1.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/goldlib/gall/gfilutl1.cpp b/goldlib/gall/gfilutl1.cpp index 0afab13..5ebcd5d 100644 --- a/goldlib/gall/gfilutl1.cpp +++ b/goldlib/gall/gfilutl1.cpp @@ -220,7 +220,8 @@ const char* AddPath(const char* path, const char* file) { void MakePathname(char* pathname, const char* path, const char* name) { Path tmpname; - strcpy(tmpname, name); + + strxcpy(tmpname, name,GMAXPATH); strschg_environ(tmpname); if(strblank(tmpname)) {