Thread (7 messages) 7 messages, 2 authors, 2011-01-17

Re: [PATCH 1/4] Bluetooth: Send an Invalid PDU Size Error Response for Service Search Req

From: Johan Hedberg <hidden>
Date: 2011-01-17 09:20:27

Hi Angela,

On Wed, Aug 25, 2010, Angela Bartholomaus wrote:
quoted hunk ↗ jump to hunk
Send error code 0x04 per CoreSpecv2.1, sec 4.4 for TP/SERVER/SS/BI-01-C
---
 src/sdpd-request.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/sdpd-request.c b/src/sdpd-request.c
index d56ffc2..cc9fe82 100644
--- a/src/sdpd-request.c
+++ b/src/sdpd-request.c
@@ -367,7 +367,7 @@ static int service_search_req(sdp_req_t *req, sdp_buf_t *buf)
 	mlen = scanned + sizeof(uint16_t) + 1;
 	// ensure we don't read past buffer
 	if (plen < mlen || plen != mlen + *(uint8_t *)(pdata+sizeof(uint16_t))) {
-		status = SDP_INVALID_SYNTAX;
+		status = SDP_INVALID_PDU_SIZE;
 		goto done;
 	}
I'm not sure exactly what test system you tested this with, but it
breaks TP/SERVER/SS/BI-02-C with the BITE tester with test vector
1.0.40.0. Also, this code path doesn't seem to be traversed at all for
TP/SERVER/SS/BI-01-C which the patch claims to fix. In order to get a
clean test report again from the BITE I went ahead and reverted[1] this
patch. Now both SS/BI-01-C and SS/BI-02-C are passing with the BITE.
Your other SDP patches don't seem to have any issues.

Johan

[1] http://git.kernel.org/?p=bluetooth/bluez.git;a=commitdiff;h=24dbc52388f1ef2e759d24d74cd32f93531c8857
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help