Fix: Possible call to strtoul() with NULL argument
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 26 Mar 2015 18:49:52 +0000 (14:49 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 26 Mar 2015 22:07:55 +0000 (18:07 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
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.026943 seconds and 4 git commands to generate.