Fixed scanbuild warnings.

This commit is contained in:
Armin Novak 2019-11-20 09:16:12 +01:00
parent f34e33ed2b
commit a5bebd3c65
3 changed files with 4 additions and 3 deletions

View File

@ -107,7 +107,8 @@ static WCHAR* drive_file_combine_fullpath(const WCHAR* base_path, const WCHAR* p
}
CopyMemory(fullpath, base_path, base_path_length);
CopyMemory((char*)fullpath + base_path_length, path, PathLength);
if (path)
CopyMemory((char*)fullpath + base_path_length, path, PathLength);
drive_file_fix_path(fullpath);
return fullpath;
}

View File

@ -880,7 +880,7 @@ static UINT drive_register_drive_path(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints,
{
size_t i, length;
DRIVE_DEVICE* drive;
UINT error;
UINT error = ERROR_INTERNAL_ERROR;
if (!pEntryPoints || !name || !path)
{

View File

@ -3278,7 +3278,7 @@ BOOL freerdp_client_load_addins(rdpChannels* channels, rdpSettings* settings)
const char* drive = tok;
char* start = strtok(tok, "(");
char* end = strtok(NULL, ")");
if (end)
if (start && end)
name = end;
if (freerdp_path_valid(name, NULL) && freerdp_path_valid(drive, NULL))