From 4f3aa1af7085b3faaecc1e4a7b727ce96fba072c Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Wed, 29 Feb 2012 15:48:57 +0100 Subject: [PATCH] * grub-core/loader/machoXX.c (grub_macho_load): Fix signed vs unsigned comparison. --- ChangeLog | 5 +++++ grub-core/loader/machoXX.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9bde17b60..d1285e378 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-02-29 Vladimir Serbinenko + + * grub-core/loader/machoXX.c (grub_macho_load): Fix signed vs unsigned + comparison. + 2012-02-29 Vladimir Serbinenko * acinclude.m4 (grub_CHECK_PIC): New test. diff --git a/grub-core/loader/machoXX.c b/grub-core/loader/machoXX.c index 0778831ab..5b78a6125 100644 --- a/grub-core/loader/machoXX.c +++ b/grub-core/loader/machoXX.c @@ -276,7 +276,7 @@ SUFFIX (grub_macho_load) (grub_macho_t macho, const char *filename, grub_ssize_t read, toread = min (hdr->filesize, hdr->vmsize); if (macho->uncompressedXX) { - if (hdr->fileoff + toread + if (hdr->fileoff + (grub_size_t) toread > _macho->uncompressed_sizeXX) read = -1; else