diff options
| -rw-r--r-- | libdw/ChangeLog | 5 | ||||
| -rw-r--r-- | libdw/memory-access.h | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index 49d70af4..a7b04000 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,8 @@ +2014-04-22 Mark Wielaard <[email protected]> + + * memory-access.h (get_sleb128_step): Remove undefined behavior + of left shifting a signed value. Replace it with a multiplication. + 2014-04-13 Mark Wielaard <[email protected]> * Makefile.am: Remove !MUDFLAP conditions. diff --git a/libdw/memory-access.h b/libdw/memory-access.h index d0ee63c5..f41f783d 100644 --- a/libdw/memory-access.h +++ b/libdw/memory-access.h @@ -1,5 +1,5 @@ /* Unaligned memory access functionality. - Copyright (C) 2000-2013 Red Hat, Inc. + Copyright (C) 2000-2014 Red Hat, Inc. This file is part of elfutils. Written by Ulrich Drepper <[email protected]>, 2001. @@ -71,7 +71,7 @@ __libdw_get_uleb128 (const unsigned char **addrp) if (likely ((__b & 0x80) == 0)) \ { \ struct { signed int i:7; } __s = { .i = __b }; \ - (var) |= (typeof (var)) __s.i << ((nth) * 7); \ + (var) |= (typeof (var)) __s.i * ((typeof (var)) 1 << ((nth) * 7)); \ return (var); \ } \ (var) |= (typeof (var)) (__b & 0x7f) << ((nth) * 7); \ |
