diff options
author | Nikolay Sturm <sturm@cvs.openbsd.org> | 2003-11-23 20:40:18 +0000 |
---|---|---|
committer | Nikolay Sturm <sturm@cvs.openbsd.org> | 2003-11-23 20:40:18 +0000 |
commit | c8e6993ef3544a8df360d2edf2f1c09067d425c9 (patch) | |
tree | ff3fb7f26cec99d1ea386fa659df081b6a38c469 /gnu/usr.bin/binutils/ld/emultempl | |
parent | ad09a769cd3fa8c867164af129affbf2922db63f (diff) |
If gld${EMULATION_NAME}_search_dir() returns NULL, return early
and try not to fopen(NULL, ...) later.
ok millert@
Diffstat (limited to 'gnu/usr.bin/binutils/ld/emultempl')
-rw-r--r-- | gnu/usr.bin/binutils/ld/emultempl/elf32.em | 2 |
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 ;; *) |