From 1e0d71837124add3adb810ebbb13607dac037635 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Mon, 26 Jan 2015 09:42:42 +0100 Subject: [PATCH 226/506] bsd: Add missing null-pointer check. Found by: Coverity scan. --- grub-core/loader/i386/bsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c index 8f691e0..bc377b3 100644 --- a/grub-core/loader/i386/bsd.c +++ b/grub-core/loader/i386/bsd.c @@ -234,7 +234,8 @@ grub_bsd_add_meta_ptr (grub_uint32_t type, void **ptr, grub_uint32_t len) { struct bsd_tag *p; for (p = tags; - p->type != (FREEBSD_MODINFO_METADATA | FREEBSD_MODINFOMD_KERNEND); + p && p->type != (FREEBSD_MODINFO_METADATA + | FREEBSD_MODINFOMD_KERNEND); p = p->next); if (p) -- 2.4.3