SquidMD5Init(&M);
- SquidMD5Update(&M, pwd, sizeof(pwd));
+ static_assert(sizeof(pwd) - 1 == 8, "WCCP2 password has exactly 8 (padded) octets, excluding storage-terminating NUL");
+
+ SquidMD5Update(&M, pwd, sizeof(pwd) - 1);
SquidMD5Update(&M, packet, len);
SquidMD5Init(&M);
- SquidMD5Update(&M, pwd, sizeof(pwd));
+ static_assert(sizeof(pwd) - 1 == 8, "WCCP2 password has exactly 8 (padded) octets, excluding storage-terminating NUL");
+
+ SquidMD5Update(&M, pwd, sizeof(pwd) - 1);
SquidMD5Update(&M, packet, len);