diff options
| author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-08-12 10:54:05 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2014-08-12 10:54:05 -0400 |
| commit | 277127d1b34778076c07556b11c6cbf917bf6252 (patch) | |
| tree | 764c39a0e7035be4881c275b3b95c5e4544632d1 | |
| parent | 4dabdb22b4d72ac21e9817c3d60711dc03f58059 (diff) | |
| download | efi-boot-shim-277127d1b34778076c07556b11c6cbf917bf6252.tar.gz efi-boot-shim-277127d1b34778076c07556b11c6cbf917bf6252.zip | |
unhook_system_services: bail on systab == NULL
Prevent unhook_system_services() from dereferencing a NULL systab, which
may occur if hook_system_services() has never been called.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
| -rw-r--r-- | replacements.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/replacements.c b/replacements.c index 48dc4378..5dfa3556 100644 --- a/replacements.c +++ b/replacements.c @@ -70,6 +70,9 @@ static EFI_HANDLE last_loaded_image; void unhook_system_services(void) { + if (!systab) + return; + systab->BootServices->Exit = system_exit; systab->BootServices->LoadImage = system_load_image; systab->BootServices->StartImage = system_start_image; |
