Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/bluetooth goto out for negative lengths too. Really ...
details: https://anonhg.NetBSD.org/src/rev/ca0e1ac1ebf9
branches: trunk
changeset: 338010:ca0e1ac1ebf9
user: christos <christos%NetBSD.org@localhost>
date: Fri May 08 11:47:53 2015 +0000
description:
goto out for negative lengths too. Really this test should either be removed
or turned into a KASSERT(). From max.
diffstat:
sys/dev/bluetooth/bcsp.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 9ebb4fb2fff6 -r ca0e1ac1ebf9 sys/dev/bluetooth/bcsp.c
--- a/sys/dev/bluetooth/bcsp.c Fri May 08 09:44:45 2015 +0000
+++ b/sys/dev/bluetooth/bcsp.c Fri May 08 11:47:53 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcsp.c,v 1.27 2015/04/30 16:01:51 christos Exp $ */
+/* $NetBSD: bcsp.c,v 1.28 2015/05/08 11:47:53 christos Exp $ */
/*
* Copyright (c) 2007 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.27 2015/04/30 16:01:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.28 2015/05/08 11:47:53 christos Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -1128,7 +1128,7 @@
for (pldlen = 0, _m = m; _m != NULL; _m = _m->m_next) {
if (_m->m_len < 0)
- return false;
+ goto out;
pldlen += _m->m_len;
}
if (pldlen > 0xfff)
@@ -1367,7 +1367,7 @@
for (pldlen = 0, _m = m; _m != NULL; _m = m->m_next) {
if (_m->m_len < 0)
- return false;
+ goto out;
pldlen += _m->m_len;
}
DPRINTFN(1, (" pldlen=%d\n", pldlen));
Home |
Main Index |
Thread Index |
Old Index