Bug#567884: [SOLUTION] solved in upstream, revision 2152

Oren Held oren at held.org.il
Sun Feb 7 22:52:29 UTC 2010


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   <torsten at debian.org>   
+                                                        
+       * kern/disk.c (grub_disk_read): Fix offset computation when reading
+       last sectors.
+
 2010-02-03  Vladimir Serbinenko  <phcoder at 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)






More information about the Pkg-grub-devel mailing list