diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-02-09 20:59:53 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2004-02-09 20:59:53 +0000 |
commit | a6429457d5b739b92c610802e68636f21a4897ba (patch) | |
tree | be6872c5b9fcd6b3368a701a0ab436467276beda /sys | |
parent | 0a16726e7f2cacd4505dee5af3bc9e0dfc3cb938 (diff) |
this is mixed sized eelf nlist version and thus cannot check sizes against SIZE_T_MAX; deraadt@ ok
Diffstat (limited to 'sys')
-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 |