mirror of
https://github.com/google/bumble.git
synced 2026-04-16 00:25:31 +00:00
Merge pull request #859 from istemon/att-read-by-type-request-fix
Return 'invalid handle' for malformed read by type request
This commit is contained in:
@@ -776,6 +776,18 @@ class Server(utils.EventEmitter):
|
|||||||
error_code=att.ATT_ATTRIBUTE_NOT_FOUND_ERROR,
|
error_code=att.ATT_ATTRIBUTE_NOT_FOUND_ERROR,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (
|
||||||
|
request.starting_handle == 0x0000
|
||||||
|
or request.starting_handle > request.ending_handle
|
||||||
|
):
|
||||||
|
response = att.ATT_Error_Response(
|
||||||
|
request_opcode_in_error=request.op_code,
|
||||||
|
attribute_handle_in_error=request.starting_handle,
|
||||||
|
error_code=att.ATT_INVALID_HANDLE_ERROR,
|
||||||
|
)
|
||||||
|
self.send_response(bearer, response)
|
||||||
|
return
|
||||||
|
|
||||||
attributes: list[tuple[int, bytes]] = []
|
attributes: list[tuple[int, bytes]] = []
|
||||||
for attribute in (
|
for attribute in (
|
||||||
attribute
|
attribute
|
||||||
|
|||||||
Reference in New Issue
Block a user