From 3dff57e8474430c098331cde4b2601944f00ae6f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 26 Oct 2005 12:17:42 +0000 Subject: * cache.c (bfd_cache_lookup_worker): Don't abort on failing to reopen file. (cache_btell, cache_bseek, cache_bflush, cache_bstat): Return -1 on bfd_cache_lookup failure. (cache_bread, cache_bwrite): Return 0 on the same. * bfdwin.c (bfd_get_file_window): Likewise. * hppabsd-core.c (hppabsd_core_core_file_p): Likewise. * sco5-core.c (sco5_core_file_p): Likewise. * trad-core.c (trad_unix_core_file_p): Likewise. --- bfd/hppabsd-core.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bfd/hppabsd-core.c') diff --git a/bfd/hppabsd-core.c b/bfd/hppabsd-core.c index 2ad27351b8..b17acc699f 100644 --- a/bfd/hppabsd-core.c +++ b/bfd/hppabsd-core.c @@ -140,6 +140,8 @@ hppabsd_core_core_file_p (abfd) FILE *stream = bfd_cache_lookup (abfd); struct stat statbuf; + if (stream == NULL) + return NULL; if (fstat (fileno (stream), &statbuf) < 0) { bfd_set_error (bfd_error_system_call); -- cgit v1.2.1