IMPORT: slz/uslz: fix incorrect sign extension in shift when reading the adler32 trailer
The zlib trailer is assembled byte by byte into the 64-bit bit accumulator:
bit_accum |= in_ptr[0] << (24 - num_bits);
in_ptr[0] is an unsigned char, that is unfortunately promoted to signed
int when shifted left, thus introducing a sign bit in upper bits if bit 7
was set with num_bits=0, that gets sign-extended to 64-bit in the
accumulator, resulting in a wrong checksum (and the stream is rejected
with USLZ_DECODE_E_BAD_CRC). Let's just cast it to uint32_t before shifting
to fix this. Note that other similar places already had the cast, this one
was just overlooked.
This is libslz upstream commit
98cf96c18d5b4636886ac66b9b6dbec323eaf11c