summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci/glxsb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/pci/glxsb.c')
-rw-r--r--sys/arch/i386/pci/glxsb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/pci/glxsb.c b/sys/arch/i386/pci/glxsb.c
index c8712262417..7ff39d1ab33 100644
--- a/sys/arch/i386/pci/glxsb.c
+++ b/sys/arch/i386/pci/glxsb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glxsb.c,v 1.11 2007/09/18 22:02:18 djm Exp $ */
+/* $OpenBSD: glxsb.c,v 1.12 2007/11/14 19:10:44 markus Exp $ */
/*
* Copyright (c) 2006 Tom Cosgrove <tom@openbsd.org>
@@ -737,6 +737,10 @@ glxsb_crypto_process(struct cryptop *crp)
goto out;
}
ses = &sc->sc_sessions[sesn];
+ if (ses->ses_used == 0) {
+ err = EINVAL;
+ goto out;
+ }
for (crd = crp->crp_desc; crd; crd = crd->crd_next) {
switch (crd->crd_alg) {