From 91384628bb4f830b0638a0665c881bb4367da5e6 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Sun, 29 Apr 2001 00:37:12 +0000 Subject: When expanding the session table, only copy the number of sessions already there to the new table; from stephen@etunnels.com (PR 1801). --- sys/dev/pci/ubsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/dev/pci') 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)); -- cgit v1.2.3