arch/x86/smbios: Fix undefined behavior

Fixes report found by undefined behavior sanitizer. Dereferencing a
pointer that's not aligned to the size of access is undefined behavior.
The report triggered for smbios_cpu_vendor(). Also fixes the same issue
in smbios_processor_name() found by inspection.

Change-Id: I1b7d08655edce729e107a5b6e61ee509ebde33b6
Signed-off-by: Ryan Salsamendi <>
Tested-by: build bot (Jenkins) <>
Reviewed-by: Nico Huber <>
Reviewed-by: Aaron Durbin <>
Reviewed-by: Philippe Mathieu-Daudé <>
1 file changed