summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa/files.isa
diff options
context:
space:
mode:
authorblambert <blambert@openbsd.org>2014-10-12 13:08:47 +0000
committerblambert <blambert@openbsd.org>2014-10-12 13:08:47 +0000
commit0b5df6d6a4aaa474dcc0a7059190a813e5a6261f (patch)
tree8daea27a6c4afb338b3307fe181c7035cf6bd8ac /sys/dev/isa/files.isa
parentdocument the semantics of operation keywords (diff)
downloadwireguard-openbsd-0b5df6d6a4aaa474dcc0a7059190a813e5a6261f.tar.xz
wireguard-openbsd-0b5df6d6a4aaa474dcc0a7059190a813e5a6261f.zip
Remove possibility of mutiplicative integer overflow by not multiplying.
Instead of the widespread-but-overflow-prone while (newlen < wanted) { newlen *= 2; } idiom, just realloc() for the space requested by the caller and check for additive overflow. Also change type of 'newlen' variable from int to size_t to avoid overflows there. Pointed out by deraadt@ ok reyk@
Diffstat (limited to 'sys/dev/isa/files.isa')
0 files changed, 0 insertions, 0 deletions