svn commit: r300686 - head/sbin/camcontrol
Don Lewis
truckman at FreeBSD.org
Wed May 25 15:52:40 UTC 2016
On 25 May, To: src-committers at freebsd.org wrote:
> Author: truckman
> Date: Wed May 25 15:49:29 2016
> New Revision: 300686
> URL: https://svnweb.freebsd.org/changeset/base/300686
>
> Log:
> 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
Differential Revision: https://reviews.freebsd.org/D6557
More information about the svn-src-all
mailing list