From 9efd864072f6919a0b1e325dcd45701c4313963a Mon Sep 17 00:00:00 2001 From: guenther Date: Sat, 24 Jul 2010 09:50:45 +0000 Subject: [PATCH] struct emul's e_arglen member is expected to count in units of sizeof(char *), not in bytes, so we've been allocating and copying around four or eight times as many bytes as we needed to ok kettenis@ deraadt@ --- sys/kern/exec_elf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 7c827e07d60..e962f9fb0f0 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.74 2010/06/29 00:28:14 tedu Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.75 2010/07/24 09:50:45 guenther Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -159,7 +159,7 @@ struct emul ELFNAMEEND(emul) = { #else NULL, #endif - sizeof (AuxInfo) * ELF_AUX_ENTRIES, + (sizeof(AuxInfo) * ELF_AUX_ENTRIES / sizeof(char *)), ELFNAME(copyargs), setregs, ELFNAME2(exec,fixup), -- 2.20.1