diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-02-25 09:12:40 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-02-25 09:12:40 +0000 |
commit | d57becdeba7ae3f64328241af42f3d9f1ab0e092 (patch) | |
tree | 94e4bc871feda9299a9649dae82ce7fbf150fd69 /sys/dev/ic/gdt_common.c | |
parent | 651f4c51fa8c4c00e99079a175c86a37e0f365c6 (diff) |
correct bounds check. yichen xie's bounds checker catch.
ok niklas@
Diffstat (limited to 'sys/dev/ic/gdt_common.c')
-rw-r--r-- | sys/dev/ic/gdt_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c index 78915070607..cc5fb483ef4 100644 --- a/sys/dev/ic/gdt_common.c +++ b/sys/dev/ic/gdt_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_common.c,v 1.22 2002/06/11 03:34:53 niklas Exp $ */ +/* $OpenBSD: gdt_common.c,v 1.23 2003/02/25 09:12:39 tedu Exp $ */ /* * Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved. @@ -209,7 +209,7 @@ gdt_attach(gdt) for (i = 0; i < gdt->sc_bus_cnt; i++) { id = gdt->sc_scratch[GDT_IOC_HDR_SZ + i * GDT_RAWIOC_SZ + GDT_RAWIOC_PROC_ID]; - gdt->sc_bus_id[id] = id < GDT_MAXID ? id : 0xff; + gdt->sc_bus_id[id] = id < GDT_MAXBUS ? id : 0xff; } } else { |