[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Small Bug in grub-core/partmap/amiga.c
From: |
ehem+grub |
Subject: |
Small Bug in grub-core/partmap/amiga.c |
Date: |
Wed, 29 Dec 2010 22:29:38 -0800 (PST) |
Alas, AmigaOS has mostly passed beyond the veil, but one can still find
small bugs sometimes:
=== modified file 'grub-core/partmap/amiga.c'
--- grub-core/partmap/amiga.c 2010-03-26 14:44:13 +0000
+++ grub-core/partmap/amiga.c 2010-12-30 06:25:26 +0000
@@ -87,7 +87,7 @@
if (grub_disk_read (disk, pos, 0, sizeof (rdsk), &rdsk))
return grub_errno;
- if (grub_strcmp ((char *) rdsk.magic, "RDSK") == 0)
+ if (grub_strncmp ((char *) rdsk.magic, "RDSK", sizeof(rdsk.magic)) == 0)
{
/* Found the first PART block. */
next = grub_be_to_cpu32 (rdsk.partitionlst);
I both like and dislike using strcmp() for this purpose. I kind of like
keeping it as a string, but strcmp()... Anyway, minimal solution.
--
(\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/)
\BS ( | address@hidden PGP F6B23DE0 | ) /
\_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/
2477\___\_|_/DC21 03A0 5D61 985B <-PGP-> F2BE 6526 ABD2 F6B2\_|_/___/3DE0
- Small Bug in grub-core/partmap/amiga.c,
ehem+grub <=