* kern/disk.c (grub_disk_read): Fix offset computation when reading
last sectors.
+2010-01-27 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * kern/disk.c (grub_disk_read): Fix offset computation when reading
+ last sectors.
+
2010-01-27 Vladimir Serbinenko <phcoder@gmail.com>
* commands/hashsum.c (hash_file): Avoid possible stack overflow by
grub_errno = GRUB_ERR_NONE;
- num = ((size + GRUB_DISK_SECTOR_SIZE - 1)
+ num = ((size + real_offset + pos + GRUB_DISK_SECTOR_SIZE - 1)
>> GRUB_DISK_SECTOR_BITS);
p = grub_realloc (tmp_buf, num << GRUB_DISK_SECTOR_BITS);
goto finish;
}
- grub_memcpy (buf, tmp_buf + real_offset, size);
+ grub_memcpy (buf, tmp_buf + pos + real_offset, size);
/* Call the read hook, if any. */
if (disk->read_hook)