projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f84cb3
)
Fix illegal memory access parsing a corrupt MACH-O format file.
author
Nick Clifton
<nickc@redhat.com>
Fri, 30 Apr 2021 13:31:03 +0000
(14:31 +0100)
committer
Nick Clifton
<nickc@redhat.com>
Fri, 30 Apr 2021 13:31:03 +0000
(14:31 +0100)
PR 27801
* mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
read 32-bit value.
bfd/ChangeLog
patch
|
blob
|
history
bfd/mach-o.c
patch
|
blob
|
history
diff --git
a/bfd/ChangeLog
b/bfd/ChangeLog
index cd9b1b386077a812c99c6397cf4639b118e1da97..c5a617cef97c0a36f887c0e102ea9ede0ae2ceaf 100644
(file)
--- a/
bfd/ChangeLog
+++ b/
bfd/ChangeLog
@@
-1,3
+1,9
@@
+2021-04-30 Nick Clifton <nickc@redhat.com>
+
+ PR 27801
+ * mach-o.c (bfd_mach_o_core_fetch_environment): Use bfd_get_32 to
+ read 32-bit value.
+
2021-04-30 Nick Clifton <nickc@redhat.com>
PR 27799
diff --git
a/bfd/mach-o.c
b/bfd/mach-o.c
index 60121c4ef4798024bb097dffc573a8db3ccec8ce..ff18ded23d50ccfba67ce1a3f1984c9411e0d111 100644
(file)
--- a/
bfd/mach-o.c
+++ b/
bfd/mach-o.c
@@
-5931,7
+5931,8
@@
bfd_mach_o_core_fetch_environment (bfd *abfd,
{
unsigned long val;
- val = *((unsigned long *) (buf + size - offset));
+ val = bfd_get_32(abfd, buf + size - offset);
+
if (! found_nonnull)
{
if (val != 0)