Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libbluetooth when placing an attribute/value pair, valid...
details: https://anonhg.NetBSD.org/src/rev/985a6ef8a90b
branches: trunk
changeset: 764322:985a6ef8a90b
user: plunky <plunky%NetBSD.org@localhost>
date: Sat Apr 16 07:19:36 2011 +0000
description:
when placing an attribute/value pair, validate that the value given
is a single data element
diffstat:
lib/libbluetooth/sdp_put.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r dea564b38d8f -r 985a6ef8a90b lib/libbluetooth/sdp_put.c
--- a/lib/libbluetooth/sdp_put.c Sat Apr 16 06:39:02 2011 +0000
+++ b/lib/libbluetooth/sdp_put.c Sat Apr 16 07:19:36 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdp_put.c,v 1.5 2011/04/05 18:19:04 plunky Exp $ */
+/* $NetBSD: sdp_put.c,v 1.6 2011/04/16 07:19:36 plunky Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: sdp_put.c,v 1.5 2011/04/05 18:19:04 plunky Exp $");
+__RCSID("$NetBSD: sdp_put.c,v 1.6 2011/04/16 07:19:36 plunky Exp $");
#include <bluetooth.h>
#include <limits.h>
@@ -65,6 +65,7 @@
sdp_data_t d = *data;
if (!sdp_put_uint16(&d, attr)
+ || sdp_data_size(value) != (value->end - value->next)
|| !sdp_put_data(&d, value))
return false;
Home |
Main Index |
Thread Index |
Old Index