Skip to content

Commit 731dd3a

Browse files
committed
multiboot: use unclamped value for bound checking
1 parent 38e2a1f commit 731dd3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/multiboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ uint8_t *mb2_find_header(uint8_t *image, int size)
338338
uint32_t *ptr;
339339
int i;
340340

341-
if (size > MB2_HEADER_MAX_OFF/4)
341+
if (size > MB2_HEADER_MAX_OFF)
342342
size = MB2_HEADER_MAX_OFF;
343343
size = size / 4;
344344
for (ptr = (uint32_t*)image,i = 0; i < size; ++i) {

0 commit comments

Comments
 (0)