vc/amd/sb800: Cast to UINT32 for shift out of bounds fix
commitf16a5ec87104c6ab83a85ababdf9d2f43940ab5c
authorPaul Menzel <pmenzel@molgen.mpg.de>
Fri, 5 Mar 2021 00:16:14 +0000 (5 01:16 +0100)
committerPatrick Georgi <pgeorgi@google.com>
Mon, 12 Jul 2021 07:32:24 +0000 (12 07:32 +0000)
tree34cc26b43c244bf0b76da2c854c9778804e591fe
parent4715c6219c5e66fb83cd88982e6d09cc69483695
vc/amd/sb800: Cast to UINT32 for shift out of bounds fix

It’s defined as `unsigned char`.

    SB800: sb_Before_Pci_Init
    shift out of bounds src/vendorcode/amd/cimx/sb800/SBCMN.c:643:53
    ubsan: unrecoverable error.

Found-by: UBSAN
Change-Id: I0c5fa16bce5b68ed3b48bb17eae6d81af894b688
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51284
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
src/vendorcode/amd/cimx/sb800/SBCMN.c