[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binutils-cvs
Subject:    [binutils-gdb] ubsan: alpha-vms: undefined shift
From:       Alan Modra via Binutils-cvs <binutils-cvs () sourceware ! org>
Date:       2021-10-31 2:24:31
Message-ID: 20211031022431.609A3385801B () sourceware ! org
[Download RAW message or body]

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=9216910ed82b2b64ced4b2031730f6a659c2034c

commit 9216910ed82b2b64ced4b2031730f6a659c2034c
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Oct 30 18:54:53 2021 +1030

    ubsan: alpha-vms: undefined shift
    
            * vms-alpha.c (evax_bfd_print_image): Shift left 1u.

Diff:
---
 bfd/vms-alpha.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c
index 10758d56e00..aed2e26d503 100644
--- a/bfd/vms-alpha.c
+++ b/bfd/vms-alpha.c
@@ -7845,7 +7845,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file)
 	}
       mask = bfd_getl32 (eihvn.subsystem_mask);
       for (j = 0; j < 32; j++)
-	if (mask & (1 << j))
+	if (mask & (1u << j))
 	  {
 	    struct vms_eihvn_subversion ver;
 	    if (bfd_bread (&ver, sizeof (ver), abfd) != sizeof (ver))
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic