From: Jérémie Galarneau Date: Thu, 26 Mar 2015 18:49:52 +0000 (-0400) Subject: Fix: Possible call to strtoul() with NULL argument X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e04aa23e052089bfd9aaa577f6a6972fb058b650;p=lttng-tools.git Fix: Possible call to strtoul() with NULL argument Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index f8f2a7ce3..89ef3b092 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -4612,6 +4612,10 @@ static int set_option(int opt, const char *arg, const char *optname) } else { unsigned long v; + if (!arg) { + ret = -EINVAL; + goto end; + } errno = 0; v = strtoul(arg, NULL, 0); if (errno != 0 || !isdigit(arg[0])) {