mirror of https://github.com/FreeRDP/FreeRDP
[coverity] 1543257 Buffer not null terminated
This commit is contained in:
parent
1473931ecd
commit
9768a5f48f
|
@ -885,7 +885,7 @@ static WIN32_FILE_SEARCH* file_search_new(const char* name, size_t namelen, cons
|
|||
WIN32_FILE_SEARCH* pFileSearch = (WIN32_FILE_SEARCH*)calloc(1, sizeof(WIN32_FILE_SEARCH));
|
||||
if (!pFileSearch)
|
||||
return NULL;
|
||||
strncpy(pFileSearch->magic, file_search_magic, sizeof(pFileSearch->magic));
|
||||
strncpy(pFileSearch->magic, file_search_magic, sizeof(pFileSearch->magic) - 1);
|
||||
|
||||
pFileSearch->lpPath = strndup(name, namelen);
|
||||
pFileSearch->lpPattern = strndup(pattern, patternlen);
|
||||
|
|
Loading…
Reference in New Issue