Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/opencrypto opencrypto: Assert crp_desc and crp_buf are n...
details: https://anonhg.NetBSD.org/src/rev/49039c907cd5
branches: trunk
changeset: 366319:49039c907cd5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun May 22 11:34:40 2022 +0000
description:
opencrypto: Assert crp_desc and crp_buf are nonnull.
- crypto_getreq ensures crp_desc is nonnull.
- Caller is responsible for setting crp_buf.
diffstat:
sys/opencrypto/crypto.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r e76a0b0029b4 -r 49039c907cd5 sys/opencrypto/crypto.c
--- a/sys/opencrypto/crypto.c Sun May 22 11:34:29 2022 +0000
+++ b/sys/opencrypto/crypto.c Sun May 22 11:34:40 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crypto.c,v 1.122 2022/05/22 11:34:17 riastradh Exp $ */
+/* $NetBSD: crypto.c,v 1.123 2022/05/22 11:34:40 riastradh Exp $ */
/* $FreeBSD: src/sys/opencrypto/crypto.c,v 1.4.2.5 2003/02/26 00:14:05 sam Exp $ */
/* $OpenBSD: crypto.c,v 1.41 2002/07/17 23:52:38 art Exp $ */
@@ -53,7 +53,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.122 2022/05/22 11:34:17 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: crypto.c,v 1.123 2022/05/22 11:34:40 riastradh Exp $");
#include <sys/param.h>
#include <sys/reboot.h>
@@ -1287,6 +1287,8 @@
struct crypto_crp_q *crp_q;
KASSERT(crp != NULL);
+ KASSERT(crp->crp_desc != NULL);
+ KASSERT(crp->crp_buf != NULL);
KASSERT(!cpu_intr_p());
DPRINTF("crp %p, alg %d\n", crp, crp->crp_desc->crd_alg);
Home |
Main Index |
Thread Index |
Old Index