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