------------------------------------------------------------ revno: 13032 revision-id: squid3@treenet.co.nz-20131119224721-rhxd757sy13gq4u8 parent: squid3@treenet.co.nz-20131119224653-j474wqa23pwxsf86 committer: Amos Jeffries branch nick: 3.4 timestamp: Tue 2013-11-19 15:47:21 -0700 message: Windows: Ensure array index is an integer in C code MSVC compiler does not accet non-integer types for array indexes so we must cast these CHAR index values to int before use. This is an iCelero Inc sponsored fix. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20131119224721-rhxd757sy13gq4u8 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # testament_sha1: 6979c0ed258a51b188cd491f9a4aa3af2989b541 # timestamp: 2013-11-19 22:52:22 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # base_revision_id: squid3@treenet.co.nz-20131119224653-\ # j474wqa23pwxsf86 # # Begin patch === modified file 'lib/encrypt.c' --- lib/encrypt.c 2012-08-28 13:00:30 +0000 +++ lib/encrypt.c 2013-11-19 22:47:21 +0000 @@ -148,7 +148,7 @@ int n; { for (; n--; pc++, a++) - *a = e[*pc]; + *a = e[(int)*pc]; } static void @@ -164,7 +164,7 @@ for (i = 0; i < 8; i++) { for (j = 0, sbval = 0; j < 6; j++) - sbval = (sbval << 1) | (nachr_r[*e++] ^ *schl++); + sbval = (sbval << 1) | (nachr_r[(int)*e++] ^ *schl++); sbval = S_BOX[i][sbval]; for (tp += 4, j = 4; j--; sbval >>= 1) *--tp = sbval & 1; @@ -173,7 +173,7 @@ e = PERM; for (i = 0; i < BS2; i++) - *nachr_l++ ^= tmp[*e++]; + *nachr_l++ ^= tmp[(int)*e++]; } void