diff options
author | Alan Modra <amodra@gmail.com> | 2021-11-14 18:07:50 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-11-14 18:07:50 +1030 |
commit | b431e7a3fe8bcd47e38e5b5a6720272861449ed5 (patch) | |
tree | f8259b49a397158eb38cc46b79c4d262d2a0fa05 /libbacktrace/elf.c | |
parent | 9d6a1a6496016c07afa8ce3f4b55f4acf64d4b25 (diff) | |
download | gdb-b431e7a3fe8bcd47e38e5b5a6720272861449ed5.zip gdb-b431e7a3fe8bcd47e38e5b5a6720272861449ed5.tar.gz gdb-b431e7a3fe8bcd47e38e5b5a6720272861449ed5.tar.bz2 |
sync libbacktrace from gcc
Diffstat (limited to 'libbacktrace/elf.c')
-rw-r--r-- | libbacktrace/elf.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c index 79d5614..8b87b2d 100644 --- a/libbacktrace/elf.c +++ b/libbacktrace/elf.c @@ -3172,10 +3172,10 @@ elf_uncompress_lzma_block (const unsigned char *compressed, /* Block header CRC. */ computed_crc = elf_crc32 (0, compressed + block_header_offset, block_header_size - 4); - stream_crc = (compressed[off] - | (compressed[off + 1] << 8) - | (compressed[off + 2] << 16) - | (compressed[off + 3] << 24)); + stream_crc = ((uint32_t)compressed[off] + | ((uint32_t)compressed[off + 1] << 8) + | ((uint32_t)compressed[off + 2] << 16) + | ((uint32_t)compressed[off + 3] << 24)); if (unlikely (computed_crc != stream_crc)) { elf_uncompress_failed (); @@ -3785,10 +3785,10 @@ elf_uncompress_lzma (struct backtrace_state *state, /* Next comes a CRC of the stream flags. */ computed_crc = elf_crc32 (0, compressed + 6, 2); - stream_crc = (compressed[8] - | (compressed[9] << 8) - | (compressed[10] << 16) - | (compressed[11] << 24)); + stream_crc = ((uint32_t)compressed[8] + | ((uint32_t)compressed[9] << 8) + | ((uint32_t)compressed[10] << 16) + | ((uint32_t)compressed[11] << 24)); if (unlikely (computed_crc != stream_crc)) { elf_uncompress_failed (); @@ -3829,10 +3829,10 @@ elf_uncompress_lzma (struct backtrace_state *state, /* Before that is a footer CRC. */ computed_crc = elf_crc32 (0, compressed + offset, 6); - stream_crc = (compressed[offset - 4] - | (compressed[offset - 3] << 8) - | (compressed[offset - 2] << 16) - | (compressed[offset - 1] << 24)); + stream_crc = ((uint32_t)compressed[offset - 4] + | ((uint32_t)compressed[offset - 3] << 8) + | ((uint32_t)compressed[offset - 2] << 16) + | ((uint32_t)compressed[offset - 1] << 24)); if (unlikely (computed_crc != stream_crc)) { elf_uncompress_failed (); @@ -3888,10 +3888,10 @@ elf_uncompress_lzma (struct backtrace_state *state, /* Next is a CRC of the index. */ computed_crc = elf_crc32 (0, compressed + index_offset, offset - index_offset); - stream_crc = (compressed[offset] - | (compressed[offset + 1] << 8) - | (compressed[offset + 2] << 16) - | (compressed[offset + 3] << 24)); + stream_crc = ((uint32_t)compressed[offset] + | ((uint32_t)compressed[offset + 1] << 8) + | ((uint32_t)compressed[offset + 2] << 16) + | ((uint32_t)compressed[offset + 3] << 24)); if (unlikely (computed_crc != stream_crc)) { elf_uncompress_failed (); |