From 1b38ceb0d4bb4ae32cb93c295e3ef493b91f9a78 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Thu, 28 May 2015 13:49:23 +0200 Subject: + Fixed defects found by Coverity (well, most of them) --- src/SFileListFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/SFileListFile.cpp') diff --git a/src/SFileListFile.cpp b/src/SFileListFile.cpp index 7919475..e47a9ea 100644 --- a/src/SFileListFile.cpp +++ b/src/SFileListFile.cpp @@ -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; -- cgit v1.2.3