* grub-core/loader/machoXX.c (grub_macho_load): Fix signed vs unsigned

comparison.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-29 15:48:57 +01:00
parent 7bd8b0c776
commit 4f3aa1af70
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2012-02-29 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/loader/machoXX.c (grub_macho_load): Fix signed vs unsigned
comparison.
2012-02-29 Vladimir Serbinenko <phcoder@gmail.com> 2012-02-29 Vladimir Serbinenko <phcoder@gmail.com>
* acinclude.m4 (grub_CHECK_PIC): New test. * acinclude.m4 (grub_CHECK_PIC): New test.

View file

@ -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); grub_ssize_t read, toread = min (hdr->filesize, hdr->vmsize);
if (macho->uncompressedXX) if (macho->uncompressedXX)
{ {
if (hdr->fileoff + toread if (hdr->fileoff + (grub_size_t) toread
> _macho->uncompressed_sizeXX) > _macho->uncompressed_sizeXX)
read = -1; read = -1;
else else