]> granicus.if.org Git - libevent/commit
Prevent endless loop in evmap_make_space.
authorTobias Stoeckmann <tobias@stoeckmann.org>
Wed, 24 Apr 2019 20:54:04 +0000 (22:54 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Fri, 26 Apr 2019 16:15:57 +0000 (18:15 +0200)
commitbd817009d5dba7dc5273e6a05e2133660d4c4ac3
tree40954140ed4859406ef56efd2851e084cffee77a
parent4a1088baf40928673317f10614fb15da9933ad4e
Prevent endless loop in evmap_make_space.

If slot is larger than INT_MAX / 2, then the loop which increases
nentries until it is larger than slot would never return.

Also make sure that nentries * msize will never overflow INT_MAX.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
evmap.c