From 723f63f2f88c91407ec0ee8c6b545f76a79e75dc Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 25 Apr 2011 15:36:08 +0200 Subject: [PATCH] * grub-core/partmap/amiga.c (amiga_partition_map_iterate): Fix a wrong action on non-detecting the magic. --- ChangeLog | 5 +++++ grub-core/partmap/amiga.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b464d83a8..3da7693db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-04-25 Vladimir Serbinenko + + * grub-core/partmap/amiga.c (amiga_partition_map_iterate): Fix a + wrong action on non-detecting the magic. + 2011-04-25 Vladimir Serbinenko * grub-core/gnulib/regex.c: Remove GRUB_MOD_LICENSE since it's diff --git a/grub-core/partmap/amiga.c b/grub-core/partmap/amiga.c index f3ba950aa..36e318beb 100644 --- a/grub-core/partmap/amiga.c +++ b/grub-core/partmap/amiga.c @@ -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)