forked from pool/bluez
Dirk Mueller
2ed80b1192
* Fix issue with A2DP cache invalidation handling. * Fix issue with A2DP and not initialized SEP codec. * Fix issue with A2DP and multiple SetConfiguration to same SEP * Fix issue with AVRCP and not properly initialized volume. * Fix issue with SDP records when operating in LE only mode. * Fix issue with HoG and not reading report map of instances. * Fix issue with GATT server crashing while disconnecting. * Fix issue with not removing connected devices. * Fix issue with enabling wake support without RPA Resolution. * Fix issue with pairing failed due to the error of Already Paired. * Add support for CONFIGURATION_DIRECTORY environment variable. * Add support for STATE_DIRECTORY environment variable. * Add support for "Bonded" property with Device API. * Add experimental support for ISO socket. - drop bluez-test-2to3.diff (obsolete/upstream) OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=330
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
# Upstream suggests to use btmon instead of hcidump and does not want those patches
|
|
# => PATCH-FIX-OPENSUSE for those two :-)
|
|
# fix some memory leak with malformed packet (reported upstream but not yet fixed)
|
|
|
|
From 5ca9510314d15d562e9ef5515a5483be5f28258d Mon Sep 17 00:00:00 2001
|
|
From: "Cho, Yu-Chen" <acho@suse.com>
|
|
Date: Wed, 21 Mar 2018 17:32:45 +0800
|
|
Subject: [PATCH BlueZ] tool/hcidump: Fix memory leak with malformed packet
|
|
|
|
Do not allow to read more then buffer size.
|
|
---
|
|
tools/parser/hci.c | 8 +++++++-
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
Index: bluez-5.65/tools/parser/hci.c
|
|
===================================================================
|
|
--- bluez-5.65.orig/tools/parser/hci.c
|
|
+++ bluez-5.65/tools/parser/hci.c
|
|
@@ -976,8 +976,14 @@ static inline void pin_code_reply_dump(i
|
|
memset(pin, 0, sizeof(pin));
|
|
if (parser.flags & DUMP_NOVENDOR)
|
|
memset(pin, '*', cp->pin_len);
|
|
- else
|
|
+ else {
|
|
+ if (cp->pin_len > sizeof(pin)){
|
|
+ perror("Read failed");
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
memcpy(pin, cp->pin_code, cp->pin_len);
|
|
+ }
|
|
printf("bdaddr %s len %d pin \'%s\'\n", addr, cp->pin_len, pin);
|
|
}
|
|
|