mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
sparc64 video.pal fix memory corruption (Igor Kovalenko)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@503 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -322,7 +322,7 @@ init_video( unsigned long fb, int width, int height, int depth, int rb )
|
||||
set_property( ph, "address", (char*)&video.fb.mphys, 4 );
|
||||
}
|
||||
video.has_video = 1;
|
||||
video.pal = malloc( 256 * sizeof(int) );
|
||||
video.pal = malloc( 256 * sizeof(ulong) );
|
||||
|
||||
s = (video.fb.mphys & 0xfff);
|
||||
size = ((video.fb.h * video.fb.rb + s) + 0xfff) & ~0xfff;
|
||||
|
||||
Reference in New Issue
Block a user