From: guenther Date: Sat, 24 Jul 2010 09:50:45 +0000 (+0000) Subject: struct emul's e_arglen member is expected to count in units of X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9efd864072f6919a0b1e325dcd45701c4313963a;p=openbsd 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@ --- 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),