summaryrefslogtreecommitdiff
path: root/sys/kern/exec_elf32.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2005-02-07 00:12:49 +0000
committerchristos <christos@NetBSD.org>2005-02-07 00:12:49 +0000
commita9fed9480a32fafe3e26d7c7b9ffdbdd0272133d (patch)
tree71e7988894e8602ab732ca16d41a3652723fb6a6 /sys/kern/exec_elf32.c
parent4cf9bb2fc236aea9ba1d8ee84275aad429498b32 (diff)
Allow 32K instead of 1K of section headers. Solaris opera binary has 15K
section headers. We only allocate memory for those headers on compat_linux and compat_ibcs2 while we probe, and although 32K is not such a big number, we could fix the code in those two places to read section-by-section instead of all the sections at once as it does now, if we really felt like it.
Diffstat (limited to 'sys/kern/exec_elf32.c')
-rw-r--r--sys/kern/exec_elf32.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/exec_elf32.c b/sys/kern/exec_elf32.c
index eff1f3eac61..6671703481c 100644
--- a/sys/kern/exec_elf32.c
+++ b/sys/kern/exec_elf32.c
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf32.c,v 1.99 2004/10/30 09:38:15 skrll Exp $ */
+/* $NetBSD: exec_elf32.c,v 1.100 2005/02/07 00:12:49 christos Exp $ */
/*-
* Copyright (c) 1994, 2000 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf32.c,v 1.99 2004/10/30 09:38:15 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf32.c,v 1.100 2005/02/07 00:12:49 christos Exp $");
/* If not included by exec_elf64.c, ELFSIZE won't be defined. */
#ifndef ELFSIZE
@@ -222,8 +222,7 @@ ELFNAME(check_header)(Elf_Ehdr *eh, int type)
if (eh->e_type != type)
return (ENOEXEC);
- if (eh->e_shnum > 1024 ||
- eh->e_phnum > 128)
+ if (eh->e_shnum > 32768 || eh->e_phnum > 128)
return (ENOEXEC);
return (0);