x86/hvm: Fix shifting in stdvga_mem_read()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 16 May 2020 18:50:45 +0000 (19:50 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 May 2020 14:22:53 +0000 (15:22 +0100)
commit97fb0253e6c2f2221bfd0895b7ffe3a99330d847
tree100fdded34c8609b97ceb4e0dd03fcecee54f1d2
parent3d6e92e309987c9e33177c9ccd155e58dbd5d0db
x86/hvm: Fix shifting in stdvga_mem_read()

stdvga_mem_read() has a return type of uint8_t, which promotes to int rather
than unsigned int.  Shifting by 24 may hit the sign bit.

Spotted by Coverity.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/stdvga.c