Fix some more lenghts.
authorSteinar H. Gunderson <sesse@samfundet.no>
Sat, 5 Feb 2005 15:33:25 +0000 (15:33 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sat, 5 Feb 2005 15:33:25 +0000 (15:33 +0000)
mcs.c

diff --git a/mcs.c b/mcs.c
index 4190e49..ce10a68 100644 (file)
--- 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