summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-17 21:25:20 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2007-09-17 21:25:20 +0000
commite2b577e5e548b58740ed5b1d9d12015cb7b233ff (patch)
treea80a09fdb70f49e96adc9d0ffdd77405fb3c3071 /vl.c
parent926acf8f73cab2c564bf23148d7ef049ef936e36 (diff)
downloadqemu-e2b577e5e548b58740ed5b1d9d12015cb7b233ff.zip
Prevent segfaulting when -clock is specified multiple times.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3181 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c2
1 files changed, 1 insertions, 1 deletions
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;
}