* include/grub/list.h (FOR_LIST_ELEMENTS_SAFE):Fix a NULL pointer

dereference.
	Reported by: qwertial.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-04-29 12:00:31 +02:00
parent 0e90dee8e8
commit e9e46c9a0c
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2013-04-29 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/list.h (FOR_LIST_ELEMENTS_SAFE):Fix a NULL pointer
dereference.
Reported by: qwertial.
2013-04-29 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/mips/arc/init.c: Fix prefix detection.

View file

@ -35,7 +35,7 @@ void EXPORT_FUNC(grub_list_push) (grub_list_t *head, grub_list_t item);
void EXPORT_FUNC(grub_list_remove) (grub_list_t item);
#define FOR_LIST_ELEMENTS(var, list) for ((var) = (list); (var); (var) = (var)->next)
#define FOR_LIST_ELEMENTS_SAFE(var, nxt, list) for ((var) = (list), (nxt) = ((var) ? (var)->next : 0); (var); (var) = (nxt), (nxt) = (var)->next)
#define FOR_LIST_ELEMENTS_SAFE(var, nxt, list) for ((var) = (list), (nxt) = ((var) ? (var)->next : 0); (var); (var) = (nxt), ((nxt) = (var) ? (var)->next : 0))
static inline void *
grub_bad_type_cast_real (int line, const char *file)