Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/spi Fix sanity check for zero sized buffer.
details: https://anonhg.NetBSD.org/src/rev/f2422fe66ff4
branches: trunk
changeset: 364486:f2422fe66ff4
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Mon Mar 28 11:09:24 2022 +0000
description:
Fix sanity check for zero sized buffer.
diffstat:
sys/dev/spi/spi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 1fddcab12810 -r f2422fe66ff4 sys/dev/spi/spi.c
--- a/sys/dev/spi/spi.c Mon Mar 28 10:38:00 2022 +0000
+++ b/sys/dev/spi/spi.c Mon Mar 28 11:09:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: spi.c,v 1.23 2022/01/19 13:33:11 thorpej Exp $ */
+/* $NetBSD: spi.c,v 1.24 2022/03/28 11:09:24 mlelstv Exp $ */
/*-
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.23 2022/01/19 13:33:11 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spi.c,v 1.24 2022/03/28 11:09:24 mlelstv Exp $");
#include "locators.h"
@@ -380,7 +380,7 @@
break;
}
if ((sit->sit_send && sit->sit_sendlen == 0)
- || (sit->sit_recv && sit->sit_recv == 0)) {
+ || (sit->sit_recv && sit->sit_recvlen == 0)) {
error = EINVAL;
break;
}
Home |
Main Index |
Thread Index |
Old Index