- updated code to protect against null pointers and uninitialized values and threading issues

This commit is contained in:
Mark Vejvoda
2013-02-04 08:30:43 +00:00
parent d02f91d2e0
commit f87b8b6ee2
35 changed files with 332 additions and 188 deletions

View File

@@ -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;