Blame SOURCES/0385-include-grub-list.h-FOR_LIST_ELEMENTS_SAFE-Fix-a-NUL.patch

f96e0b
From 36c2c2e18dd471bdfd886021afb0d5e8365b2c8e Mon Sep 17 00:00:00 2001
f96e0b
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
f96e0b
Date: Mon, 29 Apr 2013 12:00:31 +0200
f96e0b
Subject: [PATCH 385/482] 	* include/grub/list.h
f96e0b
 (FOR_LIST_ELEMENTS_SAFE):Fix a NULL pointer 	dereference. 	Reported by:
f96e0b
 qwertial.
f96e0b
f96e0b
---
f96e0b
 ChangeLog           | 6 ++++++
f96e0b
 include/grub/list.h | 2 +-
f96e0b
 2 files changed, 7 insertions(+), 1 deletion(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index f444ea9..bf413de 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,5 +1,11 @@
f96e0b
 2013-04-29  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
+	* include/grub/list.h (FOR_LIST_ELEMENTS_SAFE):Fix a NULL pointer
f96e0b
+	dereference.
f96e0b
+	Reported by: qwertial.
f96e0b
+
f96e0b
+2013-04-29  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
+
f96e0b
 	* grub-core/kern/mips/arc/init.c: Fix prefix detection.
f96e0b
 
f96e0b
 2013-04-29  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
diff --git a/include/grub/list.h b/include/grub/list.h
f96e0b
index 6f6dec0..edd20ad 100644
f96e0b
--- a/include/grub/list.h
f96e0b
+++ b/include/grub/list.h
f96e0b
@@ -35,7 +35,7 @@ void EXPORT_FUNC(grub_list_push) (grub_list_t *head, grub_list_t item);
f96e0b
 void EXPORT_FUNC(grub_list_remove) (grub_list_t item);
f96e0b
 
f96e0b
 #define FOR_LIST_ELEMENTS(var, list) for ((var) = (list); (var); (var) = (var)->next)
f96e0b
-#define FOR_LIST_ELEMENTS_SAFE(var, nxt, list) for ((var) = (list), (nxt) = ((var) ? (var)->next : 0); (var); (var) = (nxt), (nxt) = (var)->next)
f96e0b
+#define FOR_LIST_ELEMENTS_SAFE(var, nxt, list) for ((var) = (list), (nxt) = ((var) ? (var)->next : 0); (var); (var) = (nxt), ((nxt) = (var) ? (var)->next : 0))
f96e0b
 
f96e0b
 static inline void *
f96e0b
 grub_bad_type_cast_real (int line, const char *file)
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b