summaryrefslogtreecommitdiff
path: root/mesh/mesh-io-api.h
diff options
context:
space:
mode:
authorInga Stotland <inga.stotland@gmail.com>2023-03-31 17:16:02 -0700
committerBrian Gix <brian.gix@gmail.com>2023-04-03 13:29:00 -0700
commitcffd5832a52cab71679e0bc6ee02a8f7816f1950 (patch)
tree1521bc779269d8bd7b97679952bddcc9ee710021 /mesh/mesh-io-api.h
parentde8e7cfce25b8d717f5ee60ee3b79d426fdcc681 (diff)
downloadbluez-cffd5832a52cab71679e0bc6ee02a8f7816f1950.tar.gz
mesh: Tighten IO and fix out-of-bounds array access
This fixes the out-of-bounds array access in mesh-io-mgmt.c caught by address sanitizer. Similar fixes were applied earlier to generic and unit IOs. With this patch, the common code is factored into a centralized location.
Diffstat (limited to 'mesh/mesh-io-api.h')
-rw-r--r--mesh/mesh-io-api.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/mesh/mesh-io-api.h b/mesh/mesh-io-api.h
index 21c505cd0..ae51cbc55 100644
--- a/mesh/mesh-io-api.h
+++ b/mesh/mesh-io-api.h
@@ -34,6 +34,13 @@ struct mesh_io_api {
mesh_io_tx_cancel_t cancel;
};
+struct mesh_io_reg {
+ mesh_io_recv_func_t cb;
+ void *user_data;
+ uint8_t len;
+ uint8_t filter[];
+};
+
struct mesh_io {
int index;
int favored_index;