+ Fixed defects found by Coverity (well, most of them)

This commit is contained in:
Ladislav Zezula
2015-05-28 13:49:23 +02:00
parent c26e12c79f
commit 1b38ceb0d4
20 changed files with 232 additions and 135 deletions

View File

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