always initialize lpMultiByteStr parameter when calling ConvertFromUnicode
This commit is contained in:
parent
c219a8d345
commit
43cb13585d
@ -144,6 +144,7 @@ void cliprdr_process_short_format_names(cliprdrPlugin* cliprdr, STREAM* s, UINT3
|
||||
}
|
||||
else
|
||||
{
|
||||
format_name->name = NULL;
|
||||
format_name->length = ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) s->p, 32 / 2, &format_name->name, 0, NULL, NULL);
|
||||
}
|
||||
|
||||
|
@ -430,7 +430,7 @@ BOOL drive_file_query_information(DRIVE_FILE* file, UINT32 FsInformationClass, S
|
||||
|
||||
BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UINT32 Length, STREAM* input)
|
||||
{
|
||||
char* s;
|
||||
char* s = NULL;
|
||||
mode_t m;
|
||||
UINT64 size;
|
||||
int status;
|
||||
|
@ -471,7 +471,7 @@ static void drive_process_irp_query_volume_information(DRIVE_DEVICE* disk, IRP*
|
||||
|
||||
static void drive_process_irp_query_directory(DRIVE_DEVICE* disk, IRP* irp)
|
||||
{
|
||||
char* path;
|
||||
char* path = NULL;
|
||||
int status;
|
||||
DRIVE_FILE* file;
|
||||
BYTE InitialQuery;
|
||||
|
@ -72,7 +72,7 @@ typedef struct _PARALLEL_DEVICE PARALLEL_DEVICE;
|
||||
|
||||
static void parallel_process_irp_create(PARALLEL_DEVICE* parallel, IRP* irp)
|
||||
{
|
||||
char* path;
|
||||
char* path = NULL;
|
||||
int status;
|
||||
UINT32 PathLength;
|
||||
|
||||
|
@ -79,7 +79,7 @@ static BOOL serial_check_fds(SERIAL_DEVICE* serial);
|
||||
|
||||
static void serial_process_irp_create(SERIAL_DEVICE* serial, IRP* irp)
|
||||
{
|
||||
char* path;
|
||||
char* path = NULL;
|
||||
int status;
|
||||
SERIAL_TTY* tty;
|
||||
UINT32 PathLength;
|
||||
|
@ -488,7 +488,7 @@ void gcc_write_user_data_header(STREAM* s, UINT16 type, UINT16 length)
|
||||
|
||||
BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLength)
|
||||
{
|
||||
char* str;
|
||||
char* str = NULL;
|
||||
UINT32 version;
|
||||
UINT32 color_depth;
|
||||
UINT16 colorDepth = 0;
|
||||
@ -518,6 +518,7 @@ BOOL gcc_read_client_core_data(STREAM* s, rdpSettings* settings, UINT16 blockLen
|
||||
sprintf_s(settings->ClientHostname, 31, "%s", str);
|
||||
settings->ClientHostname[31] = 0;
|
||||
free(str);
|
||||
str = NULL;
|
||||
|
||||
stream_read_UINT32(s, settings->KeyboardType); /* KeyboardType */
|
||||
stream_read_UINT32(s, settings->KeyboardSubType); /* KeyboardSubType */
|
||||
|
@ -76,7 +76,7 @@ void rdp_write_system_time(STREAM* s, SYSTEM_TIME* system_time)
|
||||
|
||||
BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings)
|
||||
{
|
||||
char* str;
|
||||
char* str = NULL;
|
||||
TIME_ZONE_INFO* clientTimeZone;
|
||||
|
||||
if (stream_get_left(s) < 172)
|
||||
@ -91,6 +91,7 @@ BOOL rdp_read_client_time_zone(STREAM* s, rdpSettings* settings)
|
||||
stream_seek(s, 64);
|
||||
strncpy(clientTimeZone->standardName, str, sizeof(clientTimeZone->standardName));
|
||||
free(str);
|
||||
str = NULL;
|
||||
|
||||
rdp_read_system_time(s, &clientTimeZone->standardDate); /* StandardDate */
|
||||
stream_read_UINT32(s, clientTimeZone->standardBias); /* StandardBias */
|
||||
|
@ -325,7 +325,10 @@ void rail_UpdateWindow(rdpRail* rail, rdpWindow* window)
|
||||
if (window->fieldFlags & WINDOW_ORDER_FIELD_TITLE)
|
||||
{
|
||||
if (window->title != NULL)
|
||||
{
|
||||
free(window->title);
|
||||
window->title = NULL;
|
||||
}
|
||||
|
||||
ConvertFromUnicode(CP_UTF8, 0, (WCHAR*) window->titleInfo.string, window->titleInfo.length / 2,
|
||||
&window->title, 0, NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user