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:
Blue Swirl
2009-06-13 07:36:56 +00:00
parent 0d8df65985
commit ffc2bb1fda

View File

@@ -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 ); set_property( ph, "address", (char*)&video.fb.mphys, 4 );
} }
video.has_video = 1; video.has_video = 1;
video.pal = malloc( 256 * sizeof(int) ); video.pal = malloc( 256 * sizeof(ulong) );
s = (video.fb.mphys & 0xfff); s = (video.fb.mphys & 0xfff);
size = ((video.fb.h * video.fb.rb + s) + 0xfff) & ~0xfff; size = ((video.fb.h * video.fb.rb + s) + 0xfff) & ~0xfff;