summaryrefslogtreecommitdiff
path: root/sys/crypto/cryptosoft.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/crypto/cryptosoft.c')
-rw-r--r--sys/crypto/cryptosoft.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/crypto/cryptosoft.c b/sys/crypto/cryptosoft.c
index 6fef68ac276..3fc7e3ca8f0 100644
--- a/sys/crypto/cryptosoft.c
+++ b/sys/crypto/cryptosoft.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cryptosoft.c,v 1.88 2021/07/09 15:29:55 bluhm Exp $ */
+/* $OpenBSD: cryptosoft.c,v 1.89 2021/10/13 13:08:58 bluhm Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
@@ -1035,11 +1035,9 @@ swcr_process(struct cryptop *crp)
int type;
int i;
- /* Sanity check */
- if (crp == NULL)
- return EINVAL;
+ KASSERT(crp->crp_ndesc >= 1);
- if (crp->crp_ndesc < 1 || crp->crp_buf == NULL) {
+ if (crp->crp_buf == NULL) {
crp->crp_etype = EINVAL;
goto done;
}