diff options
author | 2001-04-29 00:37:11 +0000 | |
---|---|---|
committer | 2001-04-29 00:37:11 +0000 | |
commit | f7692b1bbe36dfe4ba4f850116d5675fbb872a0a (patch) | |
tree | d7dc5b35cb5cbc2124365daa8612bc0c2999e49b | |
parent | openssh will be at 2.9 (diff) | |
download | wireguard-openbsd-f7692b1bbe36dfe4ba4f850116d5675fbb872a0a.tar.xz wireguard-openbsd-f7692b1bbe36dfe4ba4f850116d5675fbb872a0a.zip |
When expanding the session table, only copy the number of sessions already
there to the new table; from stephen@etunnels.com (PR 1801).
-rw-r--r-- | sys/dev/pci/ubsec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/ubsec.c b/sys/dev/pci/ubsec.c index a93de2d5a65..5def3676e08 100644 --- a/sys/dev/pci/ubsec.c +++ b/sys/dev/pci/ubsec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ubsec.c,v 1.43 2001/04/06 16:27:45 jason Exp $ */ +/* $OpenBSD: ubsec.c,v 1.44 2001/04/29 00:37:11 jason Exp $ */ /* * Copyright (c) 2000 Jason L. Wright (jason@thought.net) @@ -445,7 +445,7 @@ ubsec_newsession(sidp, cri) sizeof(struct ubsec_session), M_DEVBUF, M_NOWAIT); if (ses == NULL) return (ENOMEM); - bcopy(sc->sc_sessions, ses, (sesn + 1) * + bcopy(sc->sc_sessions, ses, sesn * sizeof(struct ubsec_session)); bzero(sc->sc_sessions, sesn * sizeof(struct ubsec_session)); |