Skip to content

Commit 00361ee

Browse files
committed
fixed warning with explicit type cast
1 parent f1033f1 commit 00361ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libwolfboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ uint16_t wolfBoot_find_header(uint8_t *haystack, uint16_t type, uint8_t **ptr)
370370
continue;
371371
}
372372
len = p[2] | (p[3] << 8);
373-
if ((4 + len) > (IMAGE_HEADER_SIZE - IMAGE_HEADER_OFFSET)) {
373+
if ((4 + len) > (uint16_t)(IMAGE_HEADER_SIZE - IMAGE_HEADER_OFFSET)) {
374374
unit_dbg("This field is too large (bigger than the space available in the current header)\n");
375375
break;
376376
}

0 commit comments

Comments
 (0)