summaryrefslogtreecommitdiff
path: root/kexec/arch/i386/kexec-nbi.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/arch/i386/kexec-nbi.c')
-rw-r--r--kexec/arch/i386/kexec-nbi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/arch/i386/kexec-nbi.c b/kexec/arch/i386/kexec-nbi.c
index 469d669..443a3a7 100644
--- a/kexec/arch/i386/kexec-nbi.c
+++ b/kexec/arch/i386/kexec-nbi.c
@@ -74,7 +74,7 @@ int nbi_probe(const char *buf, off_t len)
struct segheader seg;
off_t seg_off;
/* If we don't have enough data give up */
- if ((len < sizeof(hdr)) || (len < 512)) {
+ if (((uintmax_t)len < (uintmax_t)sizeof(hdr)) || (len < 512)) {
return -1;
}
memcpy(&hdr, buf, sizeof(hdr));