I ran coverity against grub. Here's a fix for one of the things it spotted:
2011-06-11 Jim Meyering <meyer...@redhat.com> avoid NULL deref in grub_device_open * grub-core/kern/device.c (grub_device_open): Don't dereference a NULL pointer upon failed grub_env_get. === modified file 'grub-core/kern/device.c' --- grub-core/kern/device.c 2010-09-20 19:45:06 +0000 +++ grub-core/kern/device.c 2011-06-11 06:50:02 +0000 @@ -35,7 +35,7 @@ if (! name) { name = grub_env_get ("root"); - if (*name == '\0') + if (name == NULL || *name == '\0') { grub_error (GRUB_ERR_BAD_DEVICE, "no device is set"); goto fail; _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org https://lists.gnu.org/mailman/listinfo/bug-grub