mirror of
https://github.com/glest/glest-source.git
synced 2025-09-29 17:09:02 +02:00
- updated code to protect against null pointers and uninitialized values and threading issues
This commit is contained in:
@@ -297,6 +297,9 @@ int glob( char const *pattern
|
||||
cbAlloc = new_cbAlloc;
|
||||
}
|
||||
|
||||
if(buffer == NULL) {
|
||||
throw exception("buffer == NULL");
|
||||
}
|
||||
(void)lstrcpynA(buffer + cbCurr, szRelative, 1 + (int)(file_part - effectivePattern));
|
||||
(void)lstrcatA(buffer + cbCurr, sFileName.c_str());
|
||||
cbCurr += cch + 1;
|
||||
|
Reference in New Issue
Block a user