From f44a856dec4650b3ae8ff82f73958a9259387743 Mon Sep 17 00:00:00 2001 From: SweatingEgg Date: Wed, 13 Feb 2019 23:44:06 +0900 Subject: [PATCH 1/5] Update clisrv.c change the meaningless condition (size_t: unsigned type) as it must be. --- bluetooth/bthecho/common/lib/clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluetooth/bthecho/common/lib/clisrv.c b/bluetooth/bthecho/common/lib/clisrv.c index c5e22414d..72b5e2949 100644 --- a/bluetooth/bthecho/common/lib/clisrv.c +++ b/bluetooth/bthecho/common/lib/clisrv.c @@ -271,7 +271,7 @@ Return Value: WDF_OBJECT_ATTRIBUTES attributes; WDFMEMORY memoryArg1 = NULL; - if (BrbSize <= 0) + if (BrbSize != Brb->BrbHeader.Length) { TraceEvents(TRACE_LEVEL_ERROR, DBG_CONT_READER, "BrbSize has invalid value: %I64d\n", From 7ecb9428cc8f80af98c5e52603728f6fbab6b453 Mon Sep 17 00:00:00 2001 From: SweatingEgg Date: Thu, 14 Feb 2019 14:58:35 +0900 Subject: [PATCH 2/5] Update clisrv.c --- bluetooth/bthecho/common/lib/clisrv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bluetooth/bthecho/common/lib/clisrv.c b/bluetooth/bthecho/common/lib/clisrv.c index 72b5e2949..fe75ed97a 100644 --- a/bluetooth/bthecho/common/lib/clisrv.c +++ b/bluetooth/bthecho/common/lib/clisrv.c @@ -271,10 +271,11 @@ Return Value: WDF_OBJECT_ATTRIBUTES attributes; WDFMEMORY memoryArg1 = NULL; - if (BrbSize != Brb->BrbHeader.Length) + if (!Brb || BrbSize != Brb->BrbHeader.Length) { TraceEvents(TRACE_LEVEL_ERROR, DBG_CONT_READER, - "BrbSize has invalid value: %I64d\n", + "Invalid Brb value. Brb:%p, BrbSize:%I64d\n", + Brb, BrbSize ); From 34a2cd8e5dd90066308a373cfad533f4dd9d0715 Mon Sep 17 00:00:00 2001 From: SweatingEgg Date: Thu, 14 Feb 2019 15:05:21 +0900 Subject: [PATCH 3/5] Update clisrv.c --- bluetooth/bthecho/common/lib/clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluetooth/bthecho/common/lib/clisrv.c b/bluetooth/bthecho/common/lib/clisrv.c index fe75ed97a..1560eddb2 100644 --- a/bluetooth/bthecho/common/lib/clisrv.c +++ b/bluetooth/bthecho/common/lib/clisrv.c @@ -274,7 +274,7 @@ Return Value: if (!Brb || BrbSize != Brb->BrbHeader.Length) { TraceEvents(TRACE_LEVEL_ERROR, DBG_CONT_READER, - "Invalid Brb value. Brb:%p, BrbSize:%I64d\n", + "Invalid Brb value. Brb:%p, BrbSize:%zu\n", Brb, BrbSize ); From cd40f64077114f04b3b698f2249482d69d7b5917 Mon Sep 17 00:00:00 2001 From: SweatingEgg Date: Thu, 14 Feb 2019 15:33:37 +0900 Subject: [PATCH 4/5] Update clisrv.c --- bluetooth/bthecho/common/lib/clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluetooth/bthecho/common/lib/clisrv.c b/bluetooth/bthecho/common/lib/clisrv.c index 1560eddb2..db525c75b 100644 --- a/bluetooth/bthecho/common/lib/clisrv.c +++ b/bluetooth/bthecho/common/lib/clisrv.c @@ -271,7 +271,7 @@ Return Value: WDF_OBJECT_ATTRIBUTES attributes; WDFMEMORY memoryArg1 = NULL; - if (!Brb || BrbSize != Brb->BrbHeader.Length) + if (Brb == NULL || BrbSize != Brb->BrbHeader.Length) { TraceEvents(TRACE_LEVEL_ERROR, DBG_CONT_READER, "Invalid Brb value. Brb:%p, BrbSize:%zu\n", From ca56f6c55905364866f9be5c3b357c304f3cc961 Mon Sep 17 00:00:00 2001 From: SweatingEgg Date: Fri, 15 Feb 2019 14:32:05 +0900 Subject: [PATCH 5/5] Update clisrv.c --- bluetooth/bthecho/common/lib/clisrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluetooth/bthecho/common/lib/clisrv.c b/bluetooth/bthecho/common/lib/clisrv.c index db525c75b..0909725cb 100644 --- a/bluetooth/bthecho/common/lib/clisrv.c +++ b/bluetooth/bthecho/common/lib/clisrv.c @@ -274,7 +274,7 @@ Return Value: if (Brb == NULL || BrbSize != Brb->BrbHeader.Length) { TraceEvents(TRACE_LEVEL_ERROR, DBG_CONT_READER, - "Invalid Brb value. Brb:%p, BrbSize:%zu\n", + "Invalid Brb value. Brb:0x%p, BrbSize:%zu\n", Brb, BrbSize );