This revision seems to fix the bug, so I guess that simply upgrading the grub 
package to latest version would solve this issue; but I even tried to simply 
apply this patch, and it worked.

$ bzr diff -r2151..2152
=== modified file 'ChangeLog'                            
--- ChangeLog   2010-02-02 23:43:55 +0000                
+++ ChangeLog   2010-02-02 23:46:55 +0000                
@@ -1,3 +1,8 @@                                          
+2010-02-03  Torsten Landschoff   <tors...@debian.org>   
+                                                        
+       * kern/disk.c (grub_disk_read): Fix offset computation when reading
+       last sectors.
+
 2010-02-03  Vladimir Serbinenko  <phco...@gmail.com>

        * disk/i386/pc/biosdisk.c (grub_biosdisk_read): Handle non-2048 
aligned

=== modified file 'kern/disk.c'
--- kern/disk.c 2010-01-27 16:30:03 +0000
+++ kern/disk.c 2010-02-02 23:46:55 +0000
@@ -441,7 +441,7 @@

              grub_errno = GRUB_ERR_NONE;

-             num = ((size + real_offset + pos + GRUB_DISK_SECTOR_SIZE - 1)
+             num = ((size + real_offset + GRUB_DISK_SECTOR_SIZE - 1)
                     >> GRUB_DISK_SECTOR_BITS);

              p = grub_realloc (tmp_buf, num << GRUB_DISK_SECTOR_BITS);
@@ -458,7 +458,7 @@
                  goto finish;
                }

-             grub_memcpy (buf, tmp_buf + pos + real_offset, size);
+             grub_memcpy (buf, tmp_buf + real_offset, size);

              /* Call the read hook, if any.  */
              if (disk->read_hook)




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to