[common,addin] fix -Wstringop-overread warning
This commit is contained in:
parent
fb2a1f61f8
commit
7c1d83445e
@ -304,11 +304,11 @@ PVIRTUALCHANNELENTRY freerdp_load_dynamic_channel_addin_entry(LPCSTR pszName, LP
|
||||
|
||||
{
|
||||
LPCSTR pszExtension = PathGetSharedLibraryExtensionA(0);
|
||||
LPCSTR pszPrefix = FREERDP_SHARED_LIBRARY_PREFIX;
|
||||
const char pszPrefix[] = FREERDP_SHARED_LIBRARY_PREFIX;
|
||||
int rc = 0;
|
||||
|
||||
if (pszPrefix)
|
||||
cchFileName += strnlen(pszPrefix, MAX_PATH);
|
||||
cchFileName += strnlen(pszPrefix, ARRAYSIZE(pszPrefix));
|
||||
if (pszExtension)
|
||||
cchFileName += strnlen(pszExtension, MAX_PATH) + 1;
|
||||
LPSTR tmp = calloc(cchFileName, sizeof(CHAR));
|
||||
|
Loading…
x
Reference in New Issue
Block a user