Fix: Possible call to strtoul() with NULL argument
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index f8f2a7ce3c1624923f8af606b620fe8f5f443fe3..89ef3b092737d23ae83c17af76d826df953fb0b3 100644 (file)
@@ -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])) {
This page took 0.026614 seconds and 5 git commands to generate.