mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
* grub-core/commands/testload.c (grub_cmd_testload): Fix overflow
if the size isn't divisible by 512.
This commit is contained in:
1 parent
b00d7fb6c5
commit
0ccb6b3cf0
2 files changed
+9
-1
No files matched your search
@@ -100,7 +100,10 @@ grub_cmd_testload (struct grub_command *cmd __attribute__ ((unused)),
|
||||
{
|
||||
char sector[GRUB_DISK_SECTOR_SIZE];
|
||||
|
||||
pos -= GRUB_DISK_SECTOR_SIZE;
|
||||
if (pos >= GRUB_DISK_SECTOR_SIZE)
|
||||
pos -= GRUB_DISK_SECTOR_SIZE;
|
||||
else
|
||||
pos = 0;
|
||||
|
||||
grub_file_seek (file, pos);
|
||||
|
||||
|
||||
Reference in new issue
Block a user