Prevent buffer overflow in pathnames constructor

This commit is contained in:
Stas Degteff 2011-02-13 23:51:04 +00:00
parent 5325487990
commit 29c8acf226

View File

@ -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)) {