diff options
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/stand/installboot/nlist.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/sys/arch/amd64/stand/installboot/nlist.c b/sys/arch/amd64/stand/installboot/nlist.c index 477c6c0f738..b528070ff42 100644 --- a/sys/arch/amd64/stand/installboot/nlist.c +++ b/sys/arch/amd64/stand/installboot/nlist.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: nlist.c,v 1.1 2004/02/03 12:09:47 mickey Exp $"; +static char rcsid[] = "$OpenBSD: nlist.c,v 1.2 2004/02/09 20:59:52 mickey Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -330,12 +330,6 @@ __elf_fdnlist(fd, list) /* calculate section header table size */ shdr_size = ehdr.e_shentsize * ehdr.e_shnum; - /* Make sure it's not too big to mmap */ - if (shdr_size > SIZE_T_MAX) { - errno = EFBIG; - return (-1); - } - /* mmap section header table */ shdr = (Elf_Shdr *)mmap(NULL, (size_t)shdr_size, PROT_READ, MAP_SHARED|MAP_FILE, fd, (off_t) ehdr.e_shoff); @@ -371,12 +365,6 @@ __elf_fdnlist(fd, list) else munmap((caddr_t)shdr, shdr_size); - /* Check for files too large to mmap. */ - /* XXX is this really possible? */ - if (symstrsize > SIZE_T_MAX) { - errno = EFBIG; - return (-1); - } /* * Map string table into our address space. This gives us * an easy way to randomly access all the strings, without |