summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2014-10-26 10:33:49 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2014-10-26 10:33:49 +0000
commit31d80c993fb0c7986d5861f542549a0b156b2450 (patch)
tree3a8ad6b7f8b295accadb81a0b609135cf9458d2a /sys/lib
parentdab5cdfadbe0a6c7d9a78cc429a5e28f25819840 (diff)
Read the section header string table in the boot blocks' memory, not in the
loaded image area.
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libsa/loadfile_elf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/lib/libsa/loadfile_elf.c b/sys/lib/libsa/loadfile_elf.c
index 42d3adcb216..083a286d5b0 100644
--- a/sys/lib/libsa/loadfile_elf.c
+++ b/sys/lib/libsa/loadfile_elf.c
@@ -1,5 +1,5 @@
/* $NetBSD: loadfile.c,v 1.10 2000/12/03 02:53:04 tsutsui Exp $ */
-/* $OpenBSD: loadfile_elf.c,v 1.9 2014/10/09 08:21:48 matthew Exp $ */
+/* $OpenBSD: loadfile_elf.c,v 1.10 2014/10/26 10:33:48 miod Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -207,7 +207,7 @@ ELFNAME(exec)(int fd, Elf_Ehdr *elf, u_long *marks, int flags)
FREE(shp, sz);
return 1;
}
- if (READ(fd, shstr, shstrsz) != shstrsz) {
+ if (read(fd, shstr, shstrsz) != shstrsz) {
WARN(("read section header string table"));
FREE(shstr, shstrsz);
FREE(shp, sz);