X-Git-Url: https://git.sesse.net/?p=rdpsrv;a=blobdiff_plain;f=mcs.c;h=ce10a6874113b3dfb14bf3fdc5e4c8653102250f;hp=4190e49772d297ffd49ddd299645e82f6b22cae7;hb=c118f6e75e8c6e2924641cbc4c20179ab13ec11d;hpb=2d51356d04b722522a52a94594f3fd87632a02ec diff --git a/mcs.c b/mcs.c index 4190e49..ce10a68 100644 --- a/mcs.c +++ b/mcs.c @@ -282,8 +282,8 @@ mcs_send_connect_response() length = 184; // two bytes of length - out_uint8(s, 0x80 | (length >> 7)); - out_uint8(s, length & 0x7f); + out_uint8(s, 0x80 | (length >> 8)); + out_uint8(s, length & 0xff); // server info -- we claim to support RDP5 out_uint16_le(s, SEC_TAG_SRV_INFO); @@ -303,12 +303,12 @@ mcs_send_connect_response() // crypto info out_uint16_le(s, SEC_TAG_SRV_CRYPT); - out_uint16_le(s, 156); // length + out_uint16_le(s, 160); // length out_uint32_le(s, 2); // 128-bit out_uint32_le(s, 3); // high out_uint32_le(s, SEC_RANDOM_SIZE); // random_len - out_uint32_le(s, 92); // rsa_info_len + out_uint32_le(s, 108); // rsa_info_len out_uint8s(s, SEC_RANDOM_SIZE); // server_random out_uint32_le(s, 1); // RDP4-style // unknown