Skip to content

Commit

Permalink
[core,redirection] fix length of redirection strings
Browse files Browse the repository at this point in the history
length field is in bytes, when converting from UCS-2 use size in WCHAR
  • Loading branch information
akallabeth committed Apr 22, 2024
1 parent a6320dc commit 626d10a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libfreerdp/core/redirection.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ static BOOL rdp_redirection_read_base64_wchar(UINT32 flag, wStream* s, UINT32* p
const WCHAR* wchar = (const WCHAR*)ptr;

size_t utf8_len = 0;
char* utf8 = ConvertWCharNToUtf8Alloc(wchar, *pLength, &utf8_len);
char* utf8 = ConvertWCharNToUtf8Alloc(wchar, *pLength / sizeof(WCHAR), &utf8_len);
if (!utf8)
goto fail;

Expand Down

0 comments on commit 626d10a

Please sign in to comment.