Skip to content

Commit

Permalink
fb: Fix FB junk leftover from stage1 in stage2
Browse files Browse the repository at this point in the history
Signed-off-by: Hector Martin <[email protected]>
  • Loading branch information
marcan committed Sep 17, 2024
1 parent 9741ff9 commit 83ac04c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,12 @@ void fb_init(bool clear)
&orig_logo);
}

if (clear)
if (clear) {
memset32(fb.ptr, 0, fb.size);
} else {
// Workaround for m1n1 stage 1 framebuffer UAF bug
memset32(fb.ptr, 0, min(256, fb.size));
}

console.margin.rows = 2;
console.margin.cols = 4;
Expand Down

0 comments on commit 83ac04c

Please sign in to comment.