diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-12-13 11:14:55 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-12-13 11:18:00 +0000 |
commit | 783b5c3b119cc342e4dda2ddd13e39119f8c2bdf (patch) | |
tree | 960861c7ee48104d5938b184231bc793f0be214d /lib | |
parent | 7dfbbae3d413a207a25c8356b654581ec33bacb7 (diff) |
ntlm: Use short integer when decoding 16-bit values
Diffstat (limited to 'lib')
-rw-r--r-- | lib/curl_ntlm_msgs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c index 69e178992..26f20409c 100644 --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c @@ -164,9 +164,9 @@ static unsigned int readint_le(unsigned char *buf) * package to whatever endian format we're using natively. Argument is a * pointer to a 2 byte buffer. */ -static unsigned int readshort_le(unsigned char *buf) +static unsigned short readshort_le(unsigned char *buf) { - return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8); + return ((unsigned short)buf[0]) | ((unsigned short)buf[1] << 8); } /* @@ -189,7 +189,7 @@ static CURLcode ntlm_decode_type2_target(struct SessionHandle *data, size_t size, struct ntlmdata *ntlm) { - unsigned int target_info_len = 0; + unsigned short target_info_len = 0; unsigned int target_info_offset = 0; if(size >= 48) { |