Date: Mon, 21 Jun 2021 16:07:15 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 06250515cff5 - main - imgact_elf: compute auxv buffer size instead of using magic value Message-ID: <202106211607.15LG7FUJ093077@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=06250515cff552217d14145e8932cb1a543a7e07 commit 06250515cff552217d14145e8932cb1a543a7e07 Author: Edward Tomasz Napierala <trasz@FreeBSD.org> AuthorDate: 2021-06-21 14:34:19 +0000 Commit: Edward Tomasz Napierala <trasz@FreeBSD.org> CommitDate: 2021-06-21 16:07:07 +0000 imgact_elf: compute auxv buffer size instead of using magic value The new buffer is somewhat larger, but there should be no functional changes. Reviewed By: kib, imp Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30821 --- sys/kern/imgact_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 57e9ac18e63b..d114070fc903 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -2456,7 +2456,8 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep) p = (struct proc *)arg; if (sb == NULL) { size = 0; - sb = sbuf_new(NULL, NULL, 128, SBUF_FIXEDLEN); + sb = sbuf_new(NULL, NULL, AT_COUNT * sizeof(Elf_Auxinfo), + SBUF_FIXEDLEN); sbuf_set_drain(sb, sbuf_count_drain, &size); sbuf_bcat(sb, &structsize, sizeof(structsize)); PHOLD(p);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106211607.15LG7FUJ093077>