diff --git a/bluetooth/bthecho/common/lib/clisrv.c b/bluetooth/bthecho/common/lib/clisrv.c index c5e22414d..0909725cb 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 <= 0) + if (Brb == NULL || BrbSize != Brb->BrbHeader.Length) { TraceEvents(TRACE_LEVEL_ERROR, DBG_CONT_READER, - "BrbSize has invalid value: %I64d\n", + "Invalid Brb value. Brb:0x%p, BrbSize:%zu\n", + Brb, BrbSize );