From: hno <> Date: Sat, 20 Apr 2002 03:03:48 +0000 (+0000) Subject: Explicitly truncate the value to indicate that we know truncation is X-Git-Tag: SQUID_3_0_PRE1~1048 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddd266298303c4bc7e89b95a4189f3ff39e3447e;p=thirdparty%2Fsquid.git Explicitly truncate the value to indicate that we know truncation is needed when assigning an int derived value to a char.. --- diff --git a/lib/base64.c b/lib/base64.c index 20e893bd74..adee8e334a 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -1,5 +1,5 @@ /* - * $Id: base64.c,v 1.19 2001/06/29 20:20:01 wessels Exp $ + * $Id: base64.c,v 1.20 2002/04/19 21:03:48 hno Exp $ */ #include "config.h" @@ -58,7 +58,7 @@ base64_decode(const char *p) if (++c < 4) continue; /* One quantum of four encoding characters/24 bit */ - result[j++] = val >> 16; /* High 8 bits */ + result[j++] = (val >> 16) & 0xff; /* High 8 bits */ result[j++] = (val >> 8) & 0xff; /* Mid 8 bits */ result[j++] = val & 0xff; /* Low 8 bits */ val = c = 0;