Program will crash if nr_runs is 0 due to dividing by it in print_results(). Let's exit early instead. Fixes: http://bugs.debian.org/716237 Signed-off-by: Boris Egorov <egorov@xxxxxxxxx> --- src/rt-migrate-test/rt-migrate-test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rt-migrate-test/rt-migrate-test.c b/src/rt-migrate-test/rt-migrate-test.c index e3c7a09..711d8a4 100644 --- a/src/rt-migrate-test/rt-migrate-test.c +++ b/src/rt-migrate-test/rt-migrate-test.c @@ -226,7 +226,10 @@ static void parse_options (int argc, char *argv[]) break; } } - + if (nr_runs <= 0) { + fprintf(stderr, "Warning, --loops argument is non-positive. Exiting.\n"); + exit(-1); + } } static unsigned long long get_time(void) -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html