Diff between 4e1df0c30e54ef743db5e9d30f43da231d7c99e2 and 13ba9a3622b20c9a4a8201078bd285be2789c6a7
Changed Files
| File | Additions | Deletions | Status |
| android/gatt.c | +7 | -0 | modified |
Full Patch
diff --git a/android/gatt.c b/android/gatt.c
index aa258f1..e339789 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1458,6 +1458,13 @@ static void handle_client_search_service(const void *buf, uint16_t len)
DBG("");
+ if (len != sizeof(*cmd) + (cmd->filtered ? 16 : 0)) {
+ error("Invalid search service size (%u bytes), terminating",
+ len);
+ raise(SIGTERM);
+ return;
+ }
+
dev = find_device_by_conn_id(cmd->conn_id);
if (!dev) {
error("gatt: dev with conn_id=%d not found", cmd->conn_id);