diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2002-09-08 02:17:44 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2002-09-08 02:17:44 +0000 |
| commit | d0ca7c29dc0da5d08fc78f662f320f41b3600c08 (patch) | |
| tree | dd0a4a65b85edcb7c86494e1c8b1969336dcdbfd /sys/kern/imgact_elf.c | |
| parent | a9f9df5daf5321bc3a8d627dfdad70b10a30133d (diff) | |
Notes
Diffstat (limited to 'sys/kern/imgact_elf.c')
| -rw-r--r-- | sys/kern/imgact_elf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 66659fd6aac6..01e1bd26cd4d 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -188,6 +188,7 @@ __elfN(get_brandinfo)(const Elf_Ehdr *hdr, const char *interp) static int __elfN(check_header)(const Elf_Ehdr *hdr) { + Elf_Brandinfo *bi; int i; if (!IS_ELF(*hdr) || @@ -201,7 +202,8 @@ __elfN(check_header)(const Elf_Ehdr *hdr) */ for (i = 0; i < MAX_BRANDS; i++) { - if (elf_brand_list[i]->machine == hdr->e_machine) + bi = elf_brand_list[i]; + if (bi != NULL && bi->machine == hdr->e_machine) break; } if (i == MAX_BRANDS) |
