Merge pull request #4512 from chipitsine/master
resolve several possible null pointer dereference
This commit is contained in:
commit
5b52ad9128
@ -440,7 +440,7 @@ static UINT drive_process_irp_query_volume_information(DRIVE_DEVICE* drive,
|
||||
IRP* irp)
|
||||
{
|
||||
UINT32 FsInformationClass;
|
||||
wStream* output = irp->output;
|
||||
wStream* output = NULL;
|
||||
char* volumeLabel = {"FREERDP"};
|
||||
char* diskType = {"FAT32"};
|
||||
WCHAR* outStr = NULL;
|
||||
@ -454,6 +454,8 @@ static UINT drive_process_irp_query_volume_information(DRIVE_DEVICE* drive,
|
||||
if (!drive || !irp)
|
||||
return ERROR_INVALID_PARAMETER;
|
||||
|
||||
output = irp->output;
|
||||
|
||||
if (Stream_GetRemainingLength(irp->input) < 4)
|
||||
return ERROR_INVALID_DATA;
|
||||
|
||||
|
@ -577,11 +577,13 @@ void xf_ResizeDesktopWindow(xfContext* xfc, xfWindow* window, int width,
|
||||
int height)
|
||||
{
|
||||
XSizeHints* size_hints;
|
||||
rdpSettings* settings = xfc->context.settings;
|
||||
rdpSettings* settings = NULL;
|
||||
|
||||
if (!xfc || !window)
|
||||
return;
|
||||
|
||||
settings = xfc->context.settings;
|
||||
|
||||
if (!(size_hints = XAllocSizeHints()))
|
||||
return;
|
||||
|
||||
|
@ -38,18 +38,26 @@ int TestPathShell(int argc, char* argv[])
|
||||
char* path = GetKnownPath(id);
|
||||
|
||||
if (!path)
|
||||
{
|
||||
rc = -1;
|
||||
|
||||
printf("%s Path: %s\n", name, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s Path: %s\n", name, path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
{
|
||||
char* path = GetKnownSubPath(id, "freerdp");
|
||||
|
||||
if (!path)
|
||||
{
|
||||
rc = -1;
|
||||
|
||||
printf("%s SubPath: %s\n", name, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%s SubPath: %s\n", name, path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user