"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/auth/crypt-blowfish.c" between
dovecot-2.3.16.tar.gz and dovecot-2.3.17.tar.gz

About: Dovecot is an IMAP and POP3 server, written with security primarily in mind.

crypt-blowfish.c  (dovecot-2.3.16):crypt-blowfish.c  (dovecot-2.3.17)
skipping to change at line 440 skipping to change at line 440
break; break;
} }
c2 = *sptr++; c2 = *sptr++;
c1 |= c2 >> 6; c1 |= c2 >> 6;
*dptr++ = BF_itoa64[c1]; *dptr++ = BF_itoa64[c1];
*dptr++ = BF_itoa64[c2 & 0x3f]; *dptr++ = BF_itoa64[c2 & 0x3f];
} while (sptr < end); } while (sptr < end);
} }
static void BF_swap(BF_word *x, int count) static void ATTR_UNSIGNED_WRAPS
BF_swap(BF_word *x, int count)
{ {
static int endianness_check = 1; static int endianness_check = 1;
char *is_little_endian = (char *)&endianness_check; char *is_little_endian = (char *)&endianness_check;
BF_word tmp; BF_word tmp;
if (*is_little_endian != 0) if (*is_little_endian != 0)
do { do {
tmp = *x; tmp = *x;
tmp = (tmp << 16) | (tmp >> 16); tmp = (tmp << 16) | (tmp >> 16);
*x++ = ((tmp & 0x00FF00FF) << 8) | ((tmp >> 8) & 0x00FF00FF); *x++ = ((tmp & 0x00FF00FF) << 8) | ((tmp >> 8) & 0x00FF00FF);
skipping to change at line 537 skipping to change at line 538
} while (ptr < &data.ctx.P[BF_N + 2]); \ } while (ptr < &data.ctx.P[BF_N + 2]); \
\ \
ptr = data.ctx.S[0]; \ ptr = data.ctx.S[0]; \
do { \ do { \
ptr += 2; \ ptr += 2; \
BF_ENCRYPT; \ BF_ENCRYPT; \
*(ptr - 2) = L; \ *(ptr - 2) = L; \
*(ptr - 1) = R; \ *(ptr - 1) = R; \
} while (ptr < &data.ctx.S[3][0xFF]); } while (ptr < &data.ctx.S[3][0xFF]);
static void BF_set_key(const char *key, BF_key expanded, BF_key initial, static void ATTR_UNSIGNED_WRAPS
BF_set_key(const char *key, BF_key expanded, BF_key initial,
unsigned char flags) unsigned char flags)
{ {
const char *ptr = key; const char *ptr = key;
unsigned int bug, i, j; unsigned int bug, i, j;
BF_word safety, sign, diff, tmp[2]; BF_word safety, sign, diff, tmp[2];
/* /*
* There was a sign extension bug in older revisions of this function. While * There was a sign extension bug in older revisions of this function. While
* we would have liked to simply fix the bug and move on, we have to provide * we would have liked to simply fix the bug and move on, we have to provide
* a backwards compatibility feature (essentially the bug) for some systems and * a backwards compatibility feature (essentially the bug) for some systems and
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)