]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/partmap/amiga.c (amiga_partition_map_iterate): Fix a
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 25 Apr 2011 13:36:08 +0000 (15:36 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Mon, 25 Apr 2011 13:36:08 +0000 (15:36 +0200)
wrong action on non-detecting the magic.

ChangeLog
grub-core/partmap/amiga.c

index b464d83a895cd8ae4b910467909191228a85f923..3da7693dbbf2ed0f9e61f2a2dc550715bbe627c9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/partmap/amiga.c (amiga_partition_map_iterate): Fix a
+       wrong action on non-detecting the magic.
+
 2011-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/gnulib/regex.c: Remove GRUB_MOD_LICENSE since it's
index f3ba950aa7099ac478034678338ed49f48d58a86..36e318beb6576216fe6b9b82cbdd9eab0f4ec020 100644 (file)
@@ -114,8 +114,9 @@ amiga_partition_map_iterate (grub_disk_t disk,
        return grub_errno;
 
       if (grub_memcmp (apart.magic, GRUB_AMIGA_PART_MAGIC,
-                      sizeof (apart.magic)) == 0)
-
+                      sizeof (apart.magic)) != 0)
+       return grub_error (GRUB_ERR_BAD_PART_TABLE,
+                          "invalid Amiga partition map");
       /* Calculate the first block and the size of the partition.  */
       part.start = (grub_be_to_cpu32 (apart.lowcyl)
                    * grub_be_to_cpu32 (apart.heads)