grub2/0081-grub-core-fs-iso9660.c-grub_iso9660_susp_iterate-Avo.patch
Peter Jones f74b50e380 Rebase to upstream, fix a pile of bugs. The usual.
Signed-off-by: Peter Jones <pjones@redhat.com>
2013-06-12 15:37:08 -04:00

41 lines
1.3 KiB
Diff

From d814e848e1800f4571addb7ca2c548d67c470b30 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Thu, 3 Jan 2013 21:27:00 +0100
Subject: [PATCH 081/482] * grub-core/fs/iso9660.c
(grub_iso9660_susp_iterate): Avoid hang if entry->len = 0.
---
ChangeLog | 5 +++++
grub-core/fs/iso9660.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index e530ac3..2717f8a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-01-03 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/iso9660.c (grub_iso9660_susp_iterate): Avoid hang if
+ entry->len = 0.
+
2013-01-03 Colin Watson <cjwatson@ubuntu.com>
* docs/grub.texi (Invoking grub-mkrelpath): New section.
diff --git a/grub-core/fs/iso9660.c b/grub-core/fs/iso9660.c
index cd4acc8..547e156 100644
--- a/grub-core/fs/iso9660.c
+++ b/grub-core/fs/iso9660.c
@@ -295,7 +295,7 @@ grub_iso9660_susp_iterate (grub_fshelp_node_t node, grub_off_t off,
if (load_sua ())
return grub_errno;
- for (; (char *) entry < (char *) sua + sua_size - 1;
+ for (; (char *) entry < (char *) sua + sua_size - 1 && entry->len > 0;
entry = (struct grub_iso9660_susp_entry *)
((char *) entry + entry->len))
{
--
1.8.2.1