Fix: handle negative range for LTTNG_UST_REGISTER_TIMEOUT
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index c619b5449dffafaa382927d63ff193656031bf02..2ada5065f995a30fb517cc7c13331256b13a2fc1 100644 (file)
@@ -455,6 +455,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.024136 seconds and 4 git commands to generate.