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

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

No files matched your search

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