From c55d024c2934fb7b7827d46e35f76223c781774f Mon Sep 17 00:00:00 2001 From: Dan Kalowsky Date: Wed, 14 Aug 2002 20:55:11 +0000 Subject: [PATCH] Comming a fix for a compile error found in Bug #15630 # NOTE this is NOT the supplied patch in said bug for fixing imap_utf7_decode --- ext/imap/php_imap.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index ede672437f..0298e3e2be 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2049,6 +2049,7 @@ PHP_FUNCTION(imap_utf7_decode) zval **arg; const unsigned char *in, *inp, *endp; unsigned char *out, *outp; + unsigned char c; int inlen, outlen; enum { ST_NORMAL, /* printable text */ @@ -2150,13 +2151,15 @@ PHP_FUNCTION(imap_utf7_decode) break; case ST_DECODE1: outp[1] = UNB64(*inp); - *outp++ |= outp[1] >> 4; + c = outp[1] >> 4; + *outp++ |= c; *outp <<= 4; state = ST_DECODE2; break; case ST_DECODE2: outp[1] = UNB64(*inp); - *outp++ |= outp[1] >> 2; + c = outp[1] >> 2; + *outp++ |= c; *outp <<= 6; state = ST_DECODE3; break; @@ -2190,6 +2193,7 @@ PHP_FUNCTION(imap_utf7_encode) zval **arg; const unsigned char *in, *inp, *endp; unsigned char *out, *outp; + unsigned char c; int inlen, outlen; enum { ST_NORMAL, /* printable text */ @@ -2273,12 +2277,14 @@ PHP_FUNCTION(imap_utf7_encode) state = ST_ENCODE1; break; case ST_ENCODE1: - *outp++ = B64(*outp | *inp >> 4); + c = B64(*outp | *inp >> 4); + *outp++ = c; *outp = *inp++ << 2; state = ST_ENCODE2; break; case ST_ENCODE2: - *outp++ = B64(*outp | *inp >> 6); + c = B64(*outp | *inp >> 6); + *outp++ = c; *outp++ = B64(*inp++); state = ST_ENCODE0; case ST_NORMAL: -- 2.50.1