Diff between 999b9dfcedee2c20a627695c01fdc1f238b446bf and 7ad34bdbb967b1d17d32a8b2e3527fda0d9be734
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 f9d678c..3bac0fe 100644
--- a/android/gatt.c
+++ b/android/gatt.c
@@ -1264,6 +1264,13 @@ static void handle_client_get_included_service(const void *buf, uint16_t len)
DBG("");
+ if (len != sizeof(*cmd) + (cmd->number * sizeof(cmd->srvc_id[0]))) {
+ error("Invalid get incl services size (%u bytes), terminating",
+ len);
+ raise(SIGTERM);
+ return;
+ }
+
device = find_device_by_conn_id(cmd->conn_id);
if (!device) {
status = HAL_STATUS_FAILED;