From: hno <> Date: Mon, 22 Jul 2002 08:05:00 +0000 (+0000) Subject: ntlm_add_to_payload needs to adjust byteordering of the string header X-Git-Tag: SQUID_3_0_PRE1~870 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c478e015a18df075d22bd2f8e725a97dfc769015;p=thirdparty%2Fsquid.git ntlm_add_to_payload needs to adjust byteordering of the string header --- diff --git a/lib/ntlmauth.c b/lib/ntlmauth.c index 14154b5d24..06a4bc3e0f 100644 --- a/lib/ntlmauth.c +++ b/lib/ntlmauth.c @@ -1,5 +1,5 @@ /* - * $Id: ntlmauth.c,v 1.6 2002/06/17 18:27:30 hno Exp $ + * $Id: ntlmauth.c,v 1.7 2002/07/22 02:05:00 hno Exp $ * * * * * * * * * Legal stuff * * * * * * * * @@ -109,9 +109,9 @@ ntlm_add_to_payload(char *payload, int *payload_length, int l = (*payload_length); memcpy(payload + l, toadd, toadd_length); - hdr->len = toadd_length; - hdr->maxlen = toadd_length; - hdr->offset = l + base_offset; /* 48 is the base offset of the payload */ + hdr->len = SSWAP(toadd_length); + hdr->maxlen = SSWAP(toadd_length); + hdr->offset = WSWAP(l + base_offset); /* 48 is the base offset of the payload */ (*payload_length) += toadd_length; }