From: Alan Modra Date: Thu, 18 Dec 2025 21:45:14 +0000 (+1030) Subject: Re: asan: alpha-vms: mmember access within null pointer X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e05bdc73a0f0a598af22829b6ee980afb4d22e2;p=thirdparty%2Fbinutils-gdb.git 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 --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 *