diff options
author | 2003-02-25 00:26:08 +0000 | |
---|---|---|
committer | 2003-02-25 00:26:08 +0000 | |
commit | 4d81bdbaafa0c2877509c1c70b4579809d76878e (patch) | |
tree | 7f88c38a38b7d7d11e410e1ac73c0e1454f56d4b | |
parent | correct check for the size of semitones (diff) | |
download | wireguard-openbsd-4d81bdbaafa0c2877509c1c70b4579809d76878e.tar.xz wireguard-openbsd-4d81bdbaafa0c2877509c1c70b4579809d76878e.zip |
fix two off by ones
credit to Yichen Xie's bounds checker
ok mickey@
-rw-r--r-- | sys/dev/ic/ami.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c index 9075a10c3e7..a877fd414e8 100644 --- a/sys/dev/ic/ami.c +++ b/sys/dev/ic/ami.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ami.c,v 1.19 2002/07/03 21:13:06 aaron Exp $ */ +/* $OpenBSD: ami.c,v 1.20 2003/02/25 00:26:08 tedu Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -364,9 +364,9 @@ ami_attach(sc) sc->sc_maxunits = AMI_BIG_MAX_LDRIVES; bcopy (pi->api_fwver, sc->sc_fwver, 16); - sc->sc_fwver[16] = '\0'; + sc->sc_fwver[15] = '\0'; bcopy (pi->api_biosver, sc->sc_biosver, 16); - sc->sc_biosver[16] = '\0'; + sc->sc_biosver[15] = '\0'; sc->sc_channels = pi->api_channels; sc->sc_targets = pi->api_fcloops; sc->sc_memory = letoh16(pi->api_ramsize); |