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 <email@example.com>
Tested-by: build bot (Jenkins) <firstname.lastname@example.org>
Reviewed-by: Aaron Durbin <email@example.com>
Reviewed-by: Philippe Mathieu-Daudé <firstname.lastname@example.org>
1 file changed