Prevent buffer overflow in pathnames constructor
This commit is contained in:
parent
5325487990
commit
29c8acf226
@ -220,7 +220,8 @@ const char* AddPath(const char* path, const char* file) {
|
|||||||
void MakePathname(char* pathname, const char* path, const char* name) {
|
void MakePathname(char* pathname, const char* path, const char* name) {
|
||||||
|
|
||||||
Path tmpname;
|
Path tmpname;
|
||||||
strcpy(tmpname, name);
|
|
||||||
|
strxcpy(tmpname, name,GMAXPATH);
|
||||||
strschg_environ(tmpname);
|
strschg_environ(tmpname);
|
||||||
|
|
||||||
if(strblank(tmpname)) {
|
if(strblank(tmpname)) {
|
||||||
|
Reference in New Issue
Block a user