From 541ecb8d06fe2f1808606fa3ed8f46a285b4922d Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 22 Aug 2003 12:47:39 +0000 Subject: Make binutils not leak libraries --- sources/binutils-006_better_file_error.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 sources/binutils-006_better_file_error.patch (limited to 'sources/binutils-006_better_file_error.patch') diff --git a/sources/binutils-006_better_file_error.patch b/sources/binutils-006_better_file_error.patch new file mode 100644 index 0000000000..38ef52966e --- /dev/null +++ b/sources/binutils-006_better_file_error.patch @@ -0,0 +1,17 @@ +diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c +--- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001 ++++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001 +@@ -127,6 +127,13 @@ + { + bfd *nbfd; + const bfd_target *target_vec; ++ struct stat s; ++ ++ if (stat (filename, &s) == 0) ++ if (S_ISDIR(s.st_mode)) { ++ bfd_set_error (bfd_error_file_not_recognized); ++ return NULL; ++ } + + nbfd = _bfd_new_bfd (); + if (nbfd == NULL) -- cgit v1.2.3