From: Vladimir Serbinenko Date: Tue, 9 May 2017 06:39:40 +0000 (+0200) Subject: Fix bug on FDT nodes with compatible property X-Git-Tag: grub-2.04-rc1~284 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f8471532d454b2db96434c28bf7105ed69e0f4d;p=thirdparty%2Fgrub.git Fix bug on FDT nodes with compatible property --- diff --git a/grub-core/bus/fdt.c b/grub-core/bus/fdt.c index 6fb077000..34d535457 100644 --- a/grub-core/bus/fdt.c +++ b/grub-core/bus/fdt.c @@ -43,6 +43,8 @@ is_compatible (struct grub_fdtbus_driver *driver, grub_size_t compatible_size; const char *compatible = grub_fdt_get_prop (dtb, node, "compatible", &compatible_size); + if (!compatible) + return 0; const char *compatible_end = compatible + compatible_size; while (compatible < compatible_end) {