Fix: handle negative range for LTTNG_UST_REGISTER_TIMEOUT
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index 8effa36999bb8230f5b1718a8a2aa60808305343..f08e7b0698a83e1834c3c6dea2e2badb81b22bb0 100644 (file)
@@ -437,6 +437,9 @@ long get_timeout(void)
        }
        if (str_timeout)
                constructor_delay_ms = strtol(str_timeout, NULL, 10);
+       /* All negative values are considered as "-1". */
+       if (constructor_delay_ms < -1)
+               constructor_delay_ms = -1;
        return constructor_delay_ms;
 }
 
This page took 0.023179 seconds and 4 git commands to generate.