summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2004-09-15 19:00:43 +0000
committerderaadt <deraadt@openbsd.org>2004-09-15 19:00:43 +0000
commit2962275de05babf85e225209a6a4b09984531ac8 (patch)
tree3e63b45cbd1e2224859e9fb5657594cfae8ec999 /lib/libc
parentReturn the ability to queue events before hotplugd started. (diff)
downloadwireguard-openbsd-2962275de05babf85e225209a6a4b09984531ac8.tar.xz
wireguard-openbsd-2962275de05babf85e225209a6a4b09984531ac8.zip
pretty
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/nlist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c
index be0e61a8ddc..1fe0801b270 100644
--- a/lib/libc/gen/nlist.c
+++ b/lib/libc/gen/nlist.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: nlist.c,v 1.48 2004/05/18 02:05:52 jfb Exp $";
+static char rcsid[] = "$OpenBSD: nlist.c,v 1.49 2004/09/15 19:00:43 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -336,6 +336,7 @@ __elf_fdnlist(int fd, struct nlist *list)
usemalloc = 1;
if ((shdr = malloc(shdr_size)) == NULL)
return (-1);
+
if (pread(fd, shdr, shdr_size, ehdr.e_shoff) != shdr_size) {
free(shdr);
return (-1);