create 2nd strschg_environ(): one with control length of string, second without this check
This commit is contained in:
parent
75e84ece09
commit
0119f9a971
@ -443,7 +443,20 @@ int strschg_environ(char* s) {
|
||||
std::string __s = s;
|
||||
int rv = strschg_environ(__s); // Look in gfilutl2.cpp
|
||||
if(rv)
|
||||
strxcpy(s, __s.c_str(), sizeof(Path));
|
||||
strcpy(s, __s.c_str());
|
||||
return rv;
|
||||
}
|
||||
|
||||
int strschg_environ(char* s, size_t s_size) {
|
||||
|
||||
if(s == NULL) return 0;
|
||||
if(*s == NUL)
|
||||
return 0;
|
||||
|
||||
std::string __s = s;
|
||||
int rv = strschg_environ(__s); // Look in gfilutl2.cpp
|
||||
if(rv)
|
||||
strxcpy(s, __s.c_str(), s_size);
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user