commit | 4a330f62794abaa3db95a0b447f4c433e4275ce6 | [log] [tgz] |
---|---|---|
author | Mark Wielaard <mjw@redhat.com> | Sun Dec 14 00:09:29 2014 +0100 |
committer | Mark Wielaard <mjw@redhat.com> | Tue Dec 16 10:55:45 2014 +0100 |
tree | 0ccbc56b76df545b2dc9ff3806c88243ca6dad83 | |
parent | f5c340b17478c441d228b0a3f603030f53e9e2a1 [diff] |
Guard against 64bit unsigned wrap around in (int) compare functions. Dwarf_Adrr and Dwarf_Off are 64-bit unsigned, and comparison functions used in qsort or tfind return int, it is possible for the difference to be so large that it wraps around. Make sure to just return -1, 0 or 1 in compare_aranges and compare_cukey. Signed-off-by: Mark Wielaard <mjw@redhat.com>