From: Vladimir 'phcoder' Serbinenko Date: Thu, 22 Apr 2010 00:43:24 +0000 (+0200) Subject: Fix segv in reloc.c X-Git-Tag: 1.99~629^2~93 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=97b2dc70b47501e00f0b6ff3f49d606277d3b8c3;p=thirdparty%2Fgrub.git Fix segv in reloc.c --- diff --git a/lib/relocator.c b/lib/relocator.c index e43463e4d..eac290c97 100644 --- a/lib/relocator.c +++ b/lib/relocator.c @@ -957,7 +957,8 @@ malloc_in_range (struct grub_relocator *rel, ne->end = alloc_end; ne->next = extra_blocks; ne->prev = &extra_blocks; - extra_blocks->prev = &(ne->next); + if (extra_blocks) + extra_blocks->prev = &(ne->next); extra_blocks = ne; curschu->extra = ne; }