From a457060cb01576ede2da07ee1760d1b32bb90086 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/bfdwin.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bfd/bfdwin.c') diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c index d3e4ba83d1..1450ab0e96 100644 --- a/bfd/bfdwin.c +++ b/bfd/bfdwin.c @@ -153,6 +153,8 @@ bfd_get_file_window (bfd *abfd, abfd = abfd->my_archive; } f = bfd_cache_lookup (abfd); + if (f == NULL) + return FALSE; fd = fileno (f); /* Compute offsets and size for mmap and for the user's data. */ -- cgit v1.2.1