]> git.ipfire.org Git - thirdparty/elfutils.git/commit
Protect against integer overflow on shnum
authorUlf Hermann <ulf.hermann@qt.io>
Thu, 20 Apr 2017 14:04:54 +0000 (16:04 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 27 Apr 2017 14:38:48 +0000 (16:38 +0200)
commiteb956e080ff54dd219231f70f727b6b10eecfe42
treeb44fc953aac29eb701e744bfe62289d231584586
parent28149ca8173a49c6c4fcc3a3eb919bb2420517be
Protect against integer overflow on shnum

If shnum is 0, the many "shnum - 1" would result in an overflow. Check it
for 0, and only subtract once, rather than on every usage.

Signed-off-by: Ulf Hermann <ulf.hermann@qt.io>
libdwfl/ChangeLog
libdwfl/dwfl_module_getdwarf.c
src/ChangeLog
src/unstrip.c