[binutils-gdb] Re: asan: alpha-vms: mmember access within null pointer
Alan Modra
amodra@sourceware.org
Fri Dec 19 13:45:43 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4e05bdc73a0f0a598af22829b6ee980afb4d22e2
commit 4e05bdc73a0f0a598af22829b6ee980afb4d22e2
Author: Alan Modra <amodra@gmail.com>
Date: Fri Dec 19 08:15:14 2025 +1030
Re: asan: alpha-vms: mmember access within null pointer
Fix commit c01de193638c error. This in combination with the
vms_lib_bstat error led to an uninitialised stat buf st_size and
intermittent test failures.
* bfdio.c (bfd_get_file_size): Correct brace placement.
* vms-lib.c (vms_lib_bflush): Return -1.
Diff:
---
bfd/bfdio.c | 2 +-
bfd/vms-lib.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index 21e864d1318..1f6d0f81123 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -709,8 +709,8 @@ bfd_get_file_size (bfd *abfd)
&& memcmp (((struct ar_hdr *) adata->arch_header)->ar_fmag,
"Z\012", 2) == 0)
compression_p2 = 3;
- abfd = abfd->my_archive;
}
+ abfd = abfd->my_archive;
}
file_size = bfd_get_size (abfd) << compression_p2;
diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c
index 3c1f8ef007a..bdeddf635a0 100644
--- a/bfd/vms-lib.c
+++ b/bfd/vms-lib.c
@@ -1264,7 +1264,7 @@ vms_lib_bstat (struct bfd *abfd ATTRIBUTE_UNUSED,
struct stat *sb ATTRIBUTE_UNUSED)
{
/* Not supported. */
- return 0;
+ return -1;
}
static void *
More information about the Binutils-cvs
mailing list