aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/imgact_elf.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2018-11-23 23:16:01 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2018-11-23 23:16:01 +0000
commiteda8fe63c97904387498551f4fc06c51319a93be (patch)
tree95526cb8ca96ab19e721d44fbae2428e1caa1d50 /sys/kern/imgact_elf.c
parent96fdfb36497559c4d859f5009a9e0ef9fa38c344 (diff)
downloadsrc-eda8fe63c97904387498551f4fc06c51319a93be.tar.gz
src-eda8fe63c97904387498551f4fc06c51319a93be.zip
Notes
Diffstat (limited to 'sys/kern/imgact_elf.c')
-rw-r--r--sys/kern/imgact_elf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index ef77865d8777..54dfaa0995a6 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -2364,8 +2364,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Brandnote *checknote,
curthread->td_ucred, NOCRED, NULL, curthread);
if (error != 0) {
uprintf("i/o error PT_NOTE\n");
- res = FALSE;
- goto ret;
+ goto retf;
}
note = note0 = (const Elf_Note *)buf;
note_end = (const Elf_Note *)(buf + pnote->p_filesz);
@@ -2379,8 +2378,7 @@ __elfN(parse_notes)(struct image_params *imgp, Elf_Brandnote *checknote,
for (i = 0; i < 100 && note >= note0 && note < note_end; i++) {
if (!aligned(note, Elf32_Addr) || (const char *)note_end -
(const char *)note < sizeof(Elf_Note)) {
- res = FALSE;
- goto ret;
+ goto retf;
}
if (note->n_namesz != checknote->hdr.n_namesz ||
note->n_descsz != checknote->hdr.n_descsz ||
@@ -2408,6 +2406,7 @@ nextnote:
roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) +
roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE));
}
+retf:
res = FALSE;
ret:
free(buf, M_TEMP);