Module Name: src
Committed By: christos
Date: Fri May 8 11:47:53 UTC 2015
Modified Files:
src/sys/dev/bluetooth: bcsp.c
Log Message:
goto out for negative lengths too. Really this test should either be removed
or turned into a KASSERT(). From max.
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/bluetooth/bcsp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/bluetooth/bcsp.c
diff -u src/sys/dev/bluetooth/bcsp.c:1.27 src/sys/dev/bluetooth/bcsp.c:1.28
--- src/sys/dev/bluetooth/bcsp.c:1.27 Thu Apr 30 12:01:51 2015
+++ src/sys/dev/bluetooth/bcsp.c Fri May 8 07:47:53 2015
@@ -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 @@ bcsp_tx_reliable_pkt(struct bcsp_softc *
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 @@ bcsp_tx_unreliable_pkt(struct bcsp_softc
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));