From e8325b39c47e6fbf7c8c1e31f9026870d9520af5 Mon Sep 17 00:00:00 2001 From: Sven Nierlein Date: Thu, 25 Apr 2019 13:03:10 +0200 Subject: fix maxfd being zero If _SC_OPEN_MAX is available then maxfd was zero initialized and never set to the value from sysconf. This leads to segfaults with free(): invalid size introduced by commit 7cafb0e84550035fe671662c293122be975065ca. Signed-off-by: Sven Nierlein --- plugins/utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/utils.h') diff --git a/plugins/utils.h b/plugins/utils.h index 6aa316fe..33a20547 100644 --- a/plugins/utils.h +++ b/plugins/utils.h @@ -97,6 +97,8 @@ char *sperfdata (const char *, double, const char *, char *, char *, char *sperfdata_int (const char *, int, const char *, char *, char *, int, int, int, int); +int open_max (void); + /* The idea here is that, although not every plugin will use all of these, most will or should. Therefore, for consistency, these very common options should have only these meanings throughout the overall suite */ -- cgit v1.2.3