Fix some instances of out_uint{16|32} with non-zero value (should be

out_uint{16|32}_{le|be}


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@364 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
Matt Chapman 2003-04-16 08:19:15 +00:00
parent ce7ad4cfb0
commit 33ee95a206
4 changed files with 18 additions and 18 deletions

View File

@ -124,12 +124,12 @@ licence_send_request(uint8 * client_random, uint8 * rsa_data, char *user, char *
out_uint8p(s, rsa_data, SEC_MODULUS_SIZE);
out_uint8s(s, SEC_PADDING_SIZE);
out_uint16(s, LICENCE_TAG_USER);
out_uint16(s, userlen);
out_uint16_le(s, LICENCE_TAG_USER);
out_uint16_le(s, userlen);
out_uint8p(s, user, userlen);
out_uint16(s, LICENCE_TAG_HOST);
out_uint16(s, hostlen);
out_uint16_le(s, LICENCE_TAG_HOST);
out_uint16_le(s, hostlen);
out_uint8p(s, host, hostlen);
s_mark_end(s);

View File

@ -622,12 +622,12 @@ save_licence(unsigned char *data, int length)
s_ptr = &s;
s_ptr->p = data;
/* Skip first two bytes */
in_uint16(s_ptr, len);
in_uint16_le(s_ptr, len);
/* Skip three strings */
for (i = 0; i < 3; i++)
{
in_uint32(s_ptr, len);
in_uint32_le(s_ptr, len);
s_ptr->p += len;
/* Make sure that we won't be past the end of data after
* reading the next length value
@ -640,7 +640,7 @@ save_licence(unsigned char *data, int length)
return;
}
}
in_uint32(s_ptr, len);
in_uint32_le(s_ptr, len);
if (s_ptr->p + len > data + length)
{
printf("Error in parsing licence key.\n");

16
rdp.c
View File

@ -176,7 +176,7 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
{
out_uint16_le(s, len_password);
}
out_uint16_le(s, 0); /* Seems to be length of a 512 byte blob with
out_uint16(s, 0); /* Seems to be length of a 512 byte blob with
completely unknown data, but hopefully we'll do
with a 0 length block as well */
out_uint16_le(s, len_program);
@ -187,8 +187,8 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
}
rdp_out_unistr(s, domain, len_domain);
rdp_out_unistr(s, user, len_user);
out_uint16_le(s, 0);
out_uint16_le(s, 0);
out_uint16(s, 0);
out_uint16(s, 0);
if (0 < len_program)
rdp_out_unistr(s, program, len_program);
if (0 < len_directory)
@ -204,11 +204,11 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
out_uint32_le(s, 0x0a0000);
out_uint32_le(s, 0x050000);
out_uint32_le(s, 2);
out_uint32_le(s, 0);
out_uint32(s, 0);
out_uint32_le(s, 0xffffffc4);
out_uint32_le(s, 0xfffffffe);
out_uint32_le(s, 0x0f);
out_uint32_le(s, 0);
out_uint32(s, 0);
rdp_out_unistr(s, "GTB, sommartid", 2 * strlen("GTB, sommartid") - 1);
out_uint8s(s, 30 - 2 * strlen("GTP, sommartid"));
@ -216,11 +216,11 @@ rdp_send_logon_info(uint32 flags, char *domain, char *user,
out_uint32_le(s, 0x030000);
out_uint32_le(s, 0x050000);
out_uint32_le(s, 2);
out_uint32_le(s, 0);
out_uint32(s, 0);
out_uint32_le(s, 0xffffffc4);
out_uint32_le(s, 0xfffffffe);
out_uint32_le(s, 0x0f);
out_uint32_le(s, 0);
out_uint32(s, 0);
}
s_mark_end(s);
@ -308,7 +308,7 @@ rdp_out_general_caps(STREAM s)
out_uint16_le(s, 0x200); /* Protocol version */
out_uint16(s, 0); /* Pad */
out_uint16(s, 0); /* Compression types */
out_uint16(s, use_rdp5 ? 0x40d : 0);
out_uint16_le(s, use_rdp5 ? 0x40d : 0);
/* Pad, according to T.128. 0x40d seems to
trigger
the server to start sending RDP5 packets.

View File

@ -447,7 +447,7 @@ sec_out_mcs_data(STREAM s)
out_uint16_le(s, 0xca04);
break;
}
out_uint16(s, 1);
out_uint16_le(s, 1);
out_uint32(s, 0);
out_uint8(s, server_bpp);
@ -459,13 +459,13 @@ sec_out_mcs_data(STREAM s)
out_uint16_le(s, SEC_TAG_CLI_4);
out_uint16_le(s, 12);
out_uint32_le(s, 9);
out_uint32_le(s, 0);
out_uint32(s, 0);
/* Client encryption settings */
out_uint16_le(s, SEC_TAG_CLI_CRYPT);
out_uint16_le(s, 12); /* length */
out_uint32_le(s, encryption ? 0x3 : 0); /* encryption supported, 128-bit supported */
out_uint32_le(s, 0); /* Unknown */
out_uint32(s, 0); /* Unknown */
out_uint16_le(s, SEC_TAG_CLI_CHANNELS);
out_uint16_le(s, 20); /* length */