[grub/f14/master] - Fix "device" command parsing bug. Resolves: rhbz#626447
Peter Jones
pjones at fedoraproject.org
Tue Aug 31 13:56:19 UTC 2010
commit f34c1ce172fa79430cba5a973d981cef2e231781
Author: Peter Jones <pjones at redhat.com>
Date: Tue Aug 31 09:42:34 2010 -0400
- Fix "device" command parsing bug.
Resolves: rhbz#626447
grub-0.97-devpath-parsing-error-rhbz626447.patch | 63 ++++++++++++++++++++++
grub.spec | 9 +++-
2 files changed, 70 insertions(+), 2 deletions(-)
---
diff --git a/grub-0.97-devpath-parsing-error-rhbz626447.patch b/grub-0.97-devpath-parsing-error-rhbz626447.patch
new file mode 100644
index 0000000..6f548b8
--- /dev/null
+++ b/grub-0.97-devpath-parsing-error-rhbz626447.patch
@@ -0,0 +1,63 @@
+From: Peter Jones <pjones at redhat.com>
+Date: Mon, 30 Aug 2010 10:58:36 -0400
+Subject: [PATCH] Fix parsing error in "device" comman on UEFI.
+
+Gotta handle that NULL case on strchr() return.
+
+--- a/efi/efidp.c
++++ a/efi/efidp.c
+@@ -587,19 +587,19 @@ get_next_param(char *pos, char **end, char *tmp)
+ **end = *tmp;
+
+ openparen = grub_strchr(pos, '(');
+- if (*openparen)
++ if (openparen && *openparen)
+ {
+ pos = grub_strnchr(openparen + 1, ' ');
+ comma = grub_strchr(pos, ',');
+ closeparen = grub_strchr(pos, ')');
+
+- if (*comma)
++ if (comma && *comma)
+ {
+ *tmp = *comma;
+ *comma = '\0';
+ *end = comma;
+ }
+- else if (*closeparen)
++ else if (closeparen && *closeparen)
+ {
+ *tmp = *closeparen;
+ *closeparen = '\0';
+@@ -609,19 +609,19 @@ get_next_param(char *pos, char **end, char *tmp)
+ }
+
+ comma = grub_strchr(pos, ',');
+- if (*comma)
++ if (comma && *comma)
+ {
+ pos = grub_strnchr(comma + 1, ' ');
+ comma = grub_strchr(pos, ',');
+ closeparen = grub_strchr(pos, ')');
+
+- if (*comma)
++ if (comma && *comma)
+ {
+ *tmp = *comma;
+ *comma = '\0';
+ *end = comma;
+ }
+- else if (*closeparen)
++ else if (closeparen && *closeparen)
+ {
+ *tmp = *closeparen;
+ *closeparen = '\0';
+@@ -631,7 +631,7 @@ get_next_param(char *pos, char **end, char *tmp)
+ }
+
+ closeparen = grub_strchr(pos, ')');
+- if (*closeparen)
++ if (closeparen && *closeparen)
+ pos = grub_strnchr(closeparen + 1, ' ');
+
+ return pos;
diff --git a/grub.spec b/grub.spec
index 0c04d7e..354f97a 100644
--- a/grub.spec
+++ b/grub.spec
@@ -1,6 +1,6 @@
Name: grub
Version: 0.97
-Release: 67%{?dist}
+Release: 68%{?dist}
Epoch: 1
Summary: Grand Unified Boot Loader.
Group: System Environment/Base
@@ -59,6 +59,7 @@ Patch29: grub-0.97-add-strnchr.patch
Patch30: grub-0.97-efimap.patch
Patch31: grub-efi-large-memory-map.patch
Patch32: grub-0.97-version-command-rhbz621989.patch
+Patch33: grub-0.97-devpath-parsing-error-rhbz626447.patch
%description
GRUB (Grand Unified Boot Loader) is an experimental boot loader
@@ -101,6 +102,7 @@ systems.
%patch30 -p1
%patch31 -p1
%patch32 -p1
+%patch33 -p1
# Modify grub to show the full version number
sed -i 's/0\.97/%{version}-%{release}/' configure.in
@@ -166,13 +168,16 @@ fi
%{_datadir}/grub
%changelog
+* Tue Aug 31 2010 Peter Jones <pjones at redhat.com> - 0.97-68
+- Fix "device" command parsing bug.
+ Resolves: rhbz#626447
+
* Thu Aug 19 2010 Peter Jones <pjones at redhat.com> - 0.97-67
- When the EFI memory map is too large, copy the parts we can to e820
Resolves: rhbz#624806
- Add version command (bcl)
Resolves: rhbz#621989
-
* Wed Aug 04 2010 Peter Jones <pjones at redhat.com> - 0.97-66
- Draw the inverted line correctly in the menu
Resolves: rhbz#613153
More information about the scm-commits
mailing list