[channels,rdpdr] fix computer name sending

The name should be '\0' terminated.
This commit is contained in:
Armin Novak 2022-12-08 10:36:16 +01:00 committed by David Fort
parent 074f28073a
commit ec68b1f2a5

View File

@ -1177,6 +1177,9 @@ static UINT rdpdr_send_client_name_request(rdpdrPlugin* rdpdr)
computerNameLenW *= sizeof(WCHAR);
WINPR_ASSERT(computerNameLenW >= 0);
if (computerNameLenW > 0)
computerNameLenW += sizeof(WCHAR); // also write '\0'
s = StreamPool_Take(rdpdr->pool, 16U + computerNameLenW);
if (!s)