]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commit
Avoid overflow in compare_extable_entry() when entries are far appart
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 15 Jan 2016 15:02:00 +0000 (15:02 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 15 Jan 2016 15:02:00 +0000 (15:02 +0000)
commitd49a4a797514c019c7015f191c5f49e522d7a999
treee4934380e1e0fffdeb74f489a3d708da7d118911
parente2280a8642a307bfb76734b2c75cabbddd223b5d
Avoid overflow in compare_extable_entry() when entries are far appart

Constrain the return value to strictly between -1 and 1.  Without this,
sorting extable entries which are further than 2GB apart fails, as the
calculation overflows the return value.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
common/extable.c