siphash-c icon indicating copy to clipboard operation
siphash-c copied to clipboard

typecast required before left shift

Open apulsifer opened this issue 10 years ago • 0 comments

The line "last = len << 56;" (siphash.c:429) should read "last = (uint64_t)len << 56;". This is required because len is type size_t, which may be only 32 bits, even though HAVE_UINT64_T == 1. Without this typecast, the left shift by 56 always results in zero.

apulsifer avatar Apr 15 '15 11:04 apulsifer