]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
ntlm_add_to_payload needs to adjust byteordering of the string header
authorhno <>
Mon, 22 Jul 2002 08:05:00 +0000 (08:05 +0000)
committerhno <>
Mon, 22 Jul 2002 08:05:00 +0000 (08:05 +0000)
lib/ntlmauth.c

index 14154b5d242c858c39b57186ee3dff2da05666e2..06a4bc3e0ff248b6d02bff7014120280f4b999a2 100644 (file)
@@ -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;
 }