aboutsummaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-08-07 23:37:49 +0930
committerAlan Modra <amodra@gmail.com>2019-08-08 00:16:05 +0930
commit7c1c1904bedb8f873731651b420a23f573785728 (patch)
treedfd8977ec0d6f14abbc5986fde3bc90ba105a26a /cpu
parentf927cc8faff0d2e39561c90f5182ebe99b2f77f6 (diff)
downloadbinutils-7c1c1904bedb8f873731651b420a23f573785728.zip
binutils-7c1c1904bedb8f873731651b420a23f573785728.tar.gz
binutils-7c1c1904bedb8f873731651b420a23f573785728.tar.bz2
Integer overflows in readelf get_data
I noticed the test for overflow of amt = size * nmemb in get_data wasn't effective. An obvious example of nmemb = 3 and size = half max value overflows but doesn't result in amt < nmemb. This patch fixes this problem and reports a size truncation or overflow rather than out of memory in more cases. * readelf.c (get_data): Improve overflow checks.
Diffstat (limited to 'cpu')
0 files changed, 0 insertions, 0 deletions