arch/x86: Fix undefined behavior
Fixes report found by undefined behavior sanitizer. Dereferencing a
pointer that is not aligned to the size of access is undefined behavior.
Switch to memcpy() for unaligned write to EBDA_LOWMEM. Change other
write16()s in setup_ebda() to memcpy() for consistency.
Signed-off-by: Ryan Salsamendi <firstname.lastname@example.org>
Tested-by: build bot (Jenkins) <email@example.com>
Reviewed-by: Aaron Durbin <firstname.lastname@example.org>
Reviewed-by: Philippe Mathieu-Daudé <email@example.com>
1 file changed