On 11.06.2011 08:54, Jim Meyering wrote:
> I ran coverity against grub.
> Here's a fix for one of the things it spotted:
>
> 2011-06-11  Jim Meyering  <[email protected]>
>
>       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.
>
Applied. Thanks.
> === 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
> [email protected]
> https://lists.gnu.org/mailman/listinfo/bug-grub
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Bug-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to