summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsturm <sturm@openbsd.org>2003-11-23 20:40:17 +0000
committersturm <sturm@openbsd.org>2003-11-23 20:40:17 +0000
commit6bf4a065502f5f39d8a0daea50943bf16ff3dcbc (patch)
treee37be5337ea6566ec897ab973c6d450f12b5f569
parentCheck correct array index KERN_VNODE; from Alistair Kerr (diff)
downloadwireguard-openbsd-6bf4a065502f5f39d8a0daea50943bf16ff3dcbc.tar.xz
wireguard-openbsd-6bf4a065502f5f39d8a0daea50943bf16ff3dcbc.zip
If gld${EMULATION_NAME}_search_dir() returns NULL, return early
and try not to fopen(NULL, ...) later. ok millert@
-rw-r--r--gnu/usr.bin/binutils/ld/emultempl/elf32.em2
1 files changed, 2 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils/ld/emultempl/elf32.em b/gnu/usr.bin/binutils/ld/emultempl/elf32.em
index 509e4aaac63..15965570155 100644
--- a/gnu/usr.bin/binutils/ld/emultempl/elf32.em
+++ b/gnu/usr.bin/binutils/ld/emultempl/elf32.em
@@ -1070,6 +1070,8 @@ case ${target} in
*-*-openbsd*)
cat >>e${EMULATION_NAME}.c <<EOF
string = gld${EMULATION_NAME}_search_dir(search->name, filename);
+ if (string == NULL)
+ return false;
EOF
;;
*)