mirror of https://github.com/FreeRDP/FreeRDP
wlfreerdp/cliprdr: Initialize pointer before use
In `wlf_cliprdr_server_format_data_request()` `ConvertToUnicode()` may return 0 while not allocating memory for `cdata` and not setting `cdata` to a valid address. In this case, `data` points to a random address. Settting `cdata` to NULL before calling `ConvertToUnicode()` fixes this issues.
This commit is contained in:
parent
11facf8909
commit
9867793d07
|
@ -624,6 +624,7 @@ wlf_cliprdr_server_format_data_request(CliprdrClientContext* context,
|
|||
rc = ERROR_INTERNAL_ERROR;
|
||||
else
|
||||
{
|
||||
cdata = NULL;
|
||||
cnv = ConvertToUnicode(CP_UTF8, 0, (LPCSTR)data, (int)size, &cdata, 0);
|
||||
free(data);
|
||||
data = NULL;
|
||||
|
|
Loading…
Reference in New Issue