From e2b577e5e548b58740ed5b1d9d12015cb7b233ff Mon Sep 17 00:00:00 2001 From: balrog Date: Mon, 17 Sep 2007 21:25:20 +0000 Subject: Prevent segfaulting when -clock is specified multiple times. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3181 c046a42c-6fe2-441c-8c8c-71466251a162 --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index b01947fbb1..b2ebad9681 100644 --- a/vl.c +++ b/vl.c @@ -903,7 +903,7 @@ static void configure_alarms(char const *opt) while (name) { struct qemu_alarm_timer tmp; - for (i = 0; i < count; i++) { + for (i = 0; i < count && alarm_timers[i].name; i++) { if (!strcmp(alarm_timers[i].name, name)) break; } -- cgit v1.2.3