commit | eb956e080ff54dd219231f70f727b6b10eecfe42 | [log] [tgz] |
---|---|---|
author | Ulf Hermann <ulf.hermann@qt.io> | Thu Apr 20 14:04:54 2017 |
committer | Mark Wielaard <mark@klomp.org> | Thu Apr 27 14:38:48 2017 |
tree | b44fc953aac29eb701e744bfe62289d231584586 | |
parent | 28149ca8173a49c6c4fcc3a3eb919bb2420517be [diff] |
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>