* grub-core/fs/romfs.c (grub_romfs_mount): Fix pointer comparison
overflow.
This commit is contained in:
parent
efc2616ee1
commit
e7987e1b3b
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/romfs.c (grub_romfs_mount): Fix pointer comparison
|
||||
overflow.
|
||||
|
||||
2011-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/fs/squash4.c (grub_squash_inode): Fix field sizes.
|
||||
|
|
|
@ -112,7 +112,7 @@ grub_romfs_mount (grub_device_t dev)
|
|||
if (err)
|
||||
return NULL;
|
||||
for (ptr = sb.sb.label; (void *) ptr < (void *) (&sb + 1)
|
||||
&& ptr < sb.d + grub_be_to_cpu32 (sb.sb.total_size); ptr++)
|
||||
&& ptr - sb.d < (grub_ssize_t) grub_be_to_cpu32 (sb.sb.total_size); ptr++)
|
||||
if (!*ptr)
|
||||
break;
|
||||
if ((void *) ptr == &sb + 1)
|
||||
|
@ -124,7 +124,7 @@ grub_romfs_mount (grub_device_t dev)
|
|||
if (err)
|
||||
return NULL;
|
||||
for (ptr = sb.d; (void *) ptr < (void *) (&sb + 1)
|
||||
&& ptr < sb.d + grub_be_to_cpu32 (sb.sb.total_size); ptr++)
|
||||
&& ptr - sb.d < (grub_ssize_t) grub_be_to_cpu32 (sb.sb.total_size); ptr++)
|
||||
if (!*ptr)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue