mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-13 21:52:43 +00:00
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.
This commit is contained in:
parent
f7db6f4a55
commit
8a5d6919e1
@ -1,3 +1,9 @@
|
||||
2011-06-23 Jim Meyering <meyering@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.
|
||||
|
||||
2011-06-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Support non-512B sectors and agglomerate reads.
|
||||
|
@ -35,7 +35,7 @@ grub_device_open (const char *name)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user