diff options
| author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-08-12 15:33:19 +0200 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2014-08-12 10:54:05 -0400 |
| commit | 77cdb40423e29a5f9d1318cd0ada874ee1916450 (patch) | |
| tree | 764c39a0e7035be4881c275b3b95c5e4544632d1 | |
| parent | a30276e095c10be69b5282d01c20cf5daf3fa671 (diff) | |
| download | efi-boot-shim-77cdb40423e29a5f9d1318cd0ada874ee1916450.tar.gz efi-boot-shim-77cdb40423e29a5f9d1318cd0ada874ee1916450.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; |
