HomeFreeBSD

Fix a couple of Coverity Unintended sign extension sign extension

Description

Fix a couple of Coverity Unintended sign extension sign extension
defects. When shifting an unsigned byte into the upper 8 bits of
an int and the resulting value is greater than 0x7FFFFFF, the result
will be sign extended when converting to a 64 bit unsigned long.
Fix by casting to (uint64_t) before the shift.

Reported by: Coverity
CID: 1356044, 1356045
Reviewed by: ken

Details

Provenance
truckmanAuthored on
Reviewer
ken
Parents
rS300685: Fix a couple of new instances of a false positive Coverity buffer
Branches
Unknown
Tags
Unknown