libarchive/libarchive — pull request #30 by bradking (2012-11-30 13:12:33+00:00)
Title: Fix undefined left shift with signed ints

Caught by Clang's -fsanitize=shift. A small unsigned int was promoted,
according to C's regular promotion rules, to a signed int, it was then
left shifted. This sometimes pushed a 1 into the sign bit, which is
undefined behaviour. Fix by using unsigned temporaries.

The compiler should optimize out the temporaries anyway.