Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2016 08:52:31 -0700 (PDT)
From:      Don Lewis <truckman@FreeBSD.org>
To:        src-committers@freebsd.org
Cc:        svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r300686 - head/sbin/camcontrol
Message-ID:  <201605251552.u4PFqV5X006311@gw.catspoiler.org>
In-Reply-To: <201605251549.u4PFnTkp079365@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25 May, To: src-committers@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605251552.u4PFqV5X006311>