git: e5e636cf5eb6 - main - Revert "imgact_elf: Fix uninitialized variable use in note_procstat_auxv"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Apr 2026 14:07:07 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=e5e636cf5eb666a733592bd0ff85052904eb9287
commit e5e636cf5eb666a733592bd0ff85052904eb9287
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2026-04-25 14:06:34 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2026-04-25 14:06:34 +0000
Revert "imgact_elf: Fix uninitialized variable use in note_procstat_auxv"
This reverts commit 753a166bdeb3aeba02fd9678e7360f0929007368. It appears
to be unnecessary now.
---
sys/kern/imgact_elf.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 3c5fbe4df342..af0841c75549 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -2712,16 +2712,13 @@ __elfN(note_procstat_auxv)(void *arg, struct sbuf *sb, size_t *sizep)
struct proc *p;
size_t size;
int structsize;
-#if defined(COMPAT_FREEBSD32) && __ELF_WORD_SIZE == 32
- structsize = sizeof(Elf32_Auxinfo);
-#else
- structsize = sizeof(Elf_Auxinfo);
-#endif
+
p = arg;
structsize = sizeof(Elf_Auxinfo);
if (sb == NULL) {
size = 0;
- sb = sbuf_new(NULL, NULL, AT_COUNT * structsize, 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);