diff --git a/lib/rdcu_rmap.c b/lib/rdcu_rmap.c index 4773790055cc377706a19e4c77180ccbb6db5bdf..a1d571698fa15bd00e83803f8426d18473e47d32 100644 --- a/lib/rdcu_rmap.c +++ b/lib/rdcu_rmap.c @@ -684,6 +684,9 @@ int rdcu_set_return_path(uint8_t *path, uint8_t len) if (len > RMAP_MAX_REPLY_PATH_LEN) return -1; + if (len & 0x3) + return -1; /* not a multiple of 4 */ + if (!path || !len) { rpath = NULL; rpath_len = 0;