mirror of
https://github.com/ladislav-zezula/StormLib.git
synced 2026-01-31 11:36:26 +01:00
+ Fixed defects found by Coverity (well, most of them)
This commit is contained in:
@@ -543,7 +543,7 @@ static bool DoListFileSearch(TListFileCache * pCache, SFILE_FIND_DATA * lpFindFi
|
||||
if(nLength != 0 && CheckWildCard(szFileName, pCache->szWildCard))
|
||||
{
|
||||
if(nLength >= sizeof(lpFindFileData->cFileName))
|
||||
nLength = sizeof(lpFindFileData->cFileName);
|
||||
nLength = sizeof(lpFindFileData->cFileName) - 1;
|
||||
|
||||
memcpy(lpFindFileData->cFileName, szFileName, nLength);
|
||||
lpFindFileData->cFileName[nLength] = 0;
|
||||
|
||||
Reference in New Issue
Block a user