Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
grub2.5759
grub2-efi-check-path-non-null-before-grub_strrc...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File grub2-efi-check-path-non-null-before-grub_strrchr.patch of Package grub2.5759
From 004a2b1efdd782cf946387d2060ad9250d61c435 Mon Sep 17 00:00:00 2001 From: Leif Lindholm <leif.lindholm@linaro.org> Date: Mon, 17 Nov 2014 14:11:01 +0000 Subject: [PATCH 02/15] efi: check *path non-null before grub_strrchr The EFI version of grub_machine_get_bootlocation crops the boot image name back to the last / in order to get a directory path. However, it does not check that *name is actually set before calling grub_strrchr to do this, and neither does grub_strrchr before dereferencing a NULL pointer. Parent function, grub_set_prefix_and_root, does check the pointer before using. --- ChangeLog | 5 +++++ grub-core/kern/efi/init.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) Index: grub-2.02~beta2/grub-core/kern/efi/init.c =================================================================== --- grub-2.02~beta2.orig/grub-core/kern/efi/init.c +++ grub-2.02~beta2/grub-core/kern/efi/init.c @@ -63,10 +63,13 @@ grub_machine_get_bootlocation (char **de if (!*device && grub_efi_net_config) grub_efi_net_config (image->device_handle, device, path); - /* Get the directory. */ - p = grub_strrchr (*path, '/'); - if (p) - *p = '\0'; + if (*path) + { + /* Get the directory. */ + p = grub_strrchr (*path, '/'); + if (p) + *p = '\0'; + } } void
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor