[vbox-dev] [PATCH 3/8] Fixes out-of-range values

Jung-uk Kim jkim at FreeBSD.org
Mon Mar 16 17:35:05 GMT 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 03/16/2015 08:08, Michal Necasek wrote:
> 
> Hi,
> 
> Unfortunately this patch not only doesn't fix anything, it actively
> breaks the code. If you look at the comments at the top of the
> file, you'll see that the X/Y movement deltas (dX/dY) are 9-bit
> values, not 8-bit. So yes, -255 and 255 *will* fit and are not out
> of range.
> 
> You are welcome to suggest a different patch that makes clang happy
> and doesn't break the code. But clearly reducing the range from 9
> to 8 bits is not it -- in other words, the assumption that the code
> is attempting to express the -255/255 range as int8_t is
> incorrect.

Ah, it seems the problem was actually fixed in r54240 differently,
i.e., dX, dY and dZ were changed from int8_t to int.

https://www.virtualbox.org/changeset/54240

Please ignore this patch.  Actually, now I see that I mismerged it
from 4.3.24.

Sorry for the noise,

Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJVBxREAAoJEHyflib82/FG8Z0H/jPnyQV7s9L6sEpKLH8qw3Gg
5AnXdyQas5ElCZyB1xKUt3dk781uIDdP2ZwtQoE+S78re8pmNXzTYNltUe82S3u0
EqPbb8O5K7Lptu9N2m6IL+PJh0zwt7zZkVKkOpFZiLxP/X9D8xUG80gls237uFF6
MrkpzkU6XKEPbEoL6HRwCExBNvIXcC0ERgpvGP0myAnANsx5S2+hLWx0aF3OfJCg
kGJj/YJmo+vm0rgPnrwqu23i54W2PXPXexIyF7BoTJyTozf+rJ9czZm+lc59DVRa
5Y45IIilEGsmnQS6C4KUC+OaNuAkQ6SCoe9Vx3Olmov+zOyTotMAl4uABwpVxD0=
=HJ0w
-----END PGP SIGNATURE-----




More information about the vbox-dev mailing list