Skip to content

Commit 9dc10a1

Browse files
Fix BltRegion::Full bounds check (#257)
1 parent 12192a0 commit 9dc10a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/proto/console/gop.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ impl<'boot> GraphicsOutput<'boot> {
275275
fn check_blt_buffer_region(&self, region: BltRegion, dims: (usize, usize), buf_length: usize) {
276276
match region {
277277
BltRegion::Full => assert!(
278-
dims.0.saturating_add(dims.1.saturating_mul(dims.0)) <= buf_length,
278+
dims.1.saturating_mul(dims.0) <= buf_length,
279279
"BltBuffer access out of bounds"
280280
),
281281
BltRegion::SubRectangle {

0 commit comments

Comments
 (0)