diff options
author | 2014-10-26 10:33:48 +0000 | |
---|---|---|
committer | 2014-10-26 10:33:48 +0000 | |
commit | 4bae614ab0960263d7688bc4c5adfd7545144762 (patch) | |
tree | e97dcbedd09cfcd1f45d9efc648f6764dffdcec3 | |
parent | Don't forget to free() the malloc()s. (diff) | |
download | wireguard-openbsd-4bae614ab0960263d7688bc4c5adfd7545144762.tar.xz wireguard-openbsd-4bae614ab0960263d7688bc4c5adfd7545144762.zip |
Read the section header string table in the boot blocks' memory, not in the
loaded image area.
-rw-r--r-- | sys/lib/libsa/loadfile_elf.c | 4 |
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); |