diff -r 1d741a415927 tools/libxc/xg_private.c --- a/tools/libxc/xg_private.c Wed Mar 15 11:48:33 2006 -0500 +++ b/tools/libxc/xg_private.c Wed Mar 15 12:28:05 2006 -0500 @@ -77,10 +77,11 @@ char *xc_inflate_buffer(const char *in_b return (char *)in_buf; } - out_len = in_buf[in_size-4] + - (256 * (in_buf[in_size-3] + - (256 * (in_buf[in_size-2] + - (256 * in_buf[in_size-1]))))); + out_len = (unsigned char)in_buf[in_size-4] + + (256 * ((unsigned char)in_buf[in_size-3] + + (256 * ((unsigned char)in_buf[in_size-2] + + (256 * (unsigned char)in_buf[in_size-1]))))); + bzero(&zStream, sizeof(zStream)); out_buf = malloc(out_len + 16); /* Leave a little extra space */ if ( out_buf == NULL )