From a87be6dfd2194326487a6e6152c1a3086f3ae15a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Sat, 19 Jul 2014 22:35:12 +0200 Subject: Fix two Clang static analyzer issues Overflowing memory allocations should crash or exit anyway. --- src/common.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/common.c') diff --git a/src/common.c b/src/common.c index b3d5e1b..fba82b4 100644 --- a/src/common.c +++ b/src/common.c @@ -1072,6 +1072,8 @@ poller_ensure_space (struct poller *self) return; self->alloc <<= 1; + hard_assert (self->alloc != 0); + self->revents = xreallocarray (self->revents, sizeof *self->revents, self->alloc); self->info = xreallocarray -- cgit v1.2.3