Edward O'Callaghan has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/50246 )
Change subject: programmer.h: Convert anon union to anon struct ......................................................................
programmer.h: Convert anon union to anon struct
Convert the anon union of registered masters in the mst field of the flashctx to a anon struct. If we are going to dereference a pointer there in an undefined way we should crash and not plow ahead with invalid memory.
BUG=? TEST=<needed>
Change-Id: I576967a8599b923c902e39f177f39146291cc242 Signed-off-by: Edward O'Callaghan quasisec@google.com --- M programmer.h 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/46/50246/1
diff --git a/programmer.h b/programmer.h index b575a72..8cb8690 100644 --- a/programmer.h +++ b/programmer.h @@ -749,7 +749,7 @@ int register_par_master(const struct par_master *mst, const enum chipbustype buses); struct registered_master { enum chipbustype buses_supported; - union { + struct { struct par_master par; struct spi_master spi; struct opaque_master opaque;