aboutsummaryrefslogtreecommitdiff
path: root/bfd/hpux-core.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-04-04 22:49:04 +0000
committerIan Lance Taylor <ian@airs.com>1994-04-04 22:49:04 +0000
commit4002f18a05ecf53961c0e3b25a6d835576239fab (patch)
treef1418405276000a7a2eec3c0c95722c53bb9ca96 /bfd/hpux-core.c
parent6d4f771502a396883f5e201165512effd6c808b6 (diff)
downloadbinutils-4002f18a05ecf53961c0e3b25a6d835576239fab.zip
binutils-4002f18a05ecf53961c0e3b25a6d835576239fab.tar.gz
binutils-4002f18a05ecf53961c0e3b25a6d835576239fab.tar.bz2
Made sure that every call to bfd_read, bfd_write, and bfd_seek
checks the return value and handled bfd_error correctly. These changes are not itemised.
Diffstat (limited to 'bfd/hpux-core.c')
-rw-r--r--bfd/hpux-core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c
index ef9f32d..81b0e53 100644
--- a/bfd/hpux-core.c
+++ b/bfd/hpux-core.c
@@ -136,7 +136,9 @@ hpux_core_core_file_p (abfd)
case CORE_EXEC:
{
struct proc_exec proc_exec;
- bfd_read ((void *) &proc_exec, 1, core_header.len, abfd);
+ if (bfd_read ((void *) &proc_exec, 1, core_header.len, abfd)
+ != core_header.len)
+ break;
strncpy (core_command (abfd), proc_exec.cmd, MAXCOMLEN + 1);
}
break;
@@ -148,7 +150,9 @@ hpux_core_core_file_p (abfd)
core_header.len,
(int) &proc_info - (int) &proc_info.hw_regs,
2);
- bfd_read (&proc_info, 1, core_header.len, abfd);
+ if (bfd_read (&proc_info, 1, core_header.len, abfd)
+ != core_header.len)
+ break;
core_signal (abfd) = proc_info.sig;
}
if (!core_regsec (abfd))