mirror of
https://github.com/google/bumble.git
synced 2026-04-16 00:25:31 +00:00
Return 'invalid handle' for malformed read by type request
This commit is contained in:
@@ -777,6 +777,18 @@ class Server(utils.EventEmitter):
|
||||
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]] = []
|
||||
for attribute in (
|
||||
attribute
|
||||
|
||||
Reference in New Issue
Block a user