fix(memory share): correctly validate memory regions
There were integer overflows galore.
Change-Id: Ief59632b80667697655181d410544e71c641e235
Signed-off-by: Demi Marie Obenour <demiobenour@gmail.com>
diff --git a/inc/hf/ffa_memory_internal.h b/inc/hf/ffa_memory_internal.h
index dac2c94..43b7709 100644
--- a/inc/hf/ffa_memory_internal.h
+++ b/inc/hf/ffa_memory_internal.h
@@ -44,6 +44,8 @@
static_assert(sizeof(struct ffa_mem_relinquish) % 16 == 0,
"struct ffa_mem_relinquish must be a multiple of 16 "
"bytes long.");
+static_assert(sizeof(((struct ffa_memory_region){0}).receiver_count == 4),
+ "struct ffa_memory_region::receiver_count must be 4 bytes long");
struct ffa_memory_share_state {
/**