diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-12-01 07:31:56 +0000 |
---|---|---|
committer | Dongkyun Son <dongkyun.s@samsung.com> | 2019-07-22 11:56:46 +0000 |
commit | 7810f4013db4b6ec8108a4a1c66a1ec2d8a9f377 (patch) | |
tree | 12c6ed87d66b1f442d7118d9aa598805fc9fd9d5 | |
parent | 2135d204d97bb02bc9c006efe92ef1347ea0c0d2 (diff) | |
download | linaro-gcc-7810f4013db4b6ec8108a4a1c66a1ec2d8a9f377.tar.gz linaro-gcc-7810f4013db4b6ec8108a4a1c66a1ec2d8a9f377.tar.bz2 linaro-gcc-7810f4013db4b6ec8108a4a1c66a1ec2d8a9f377.zip |
PR sanitizer/88289
* asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
an off-by-one for BYTES_BIG_ENDIAN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266708 138bc75d-0d04-0410-961f-82ee72b054a4
(cherry picked ef0c2db0d6a9d324bca1f4d2d4478034a63d54a7)
Change-Id: Ied661ed605dc4d060c78e5c6db31763fd35e77e1
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/asan.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6513b90c47f..2dd219f4ce3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-12-01 Jakub Jelinek <jakub@redhat.com> + PR sanitizer/88289 + * asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up + an off-by-one for BYTES_BIG_ENDIAN. + 2018-11-30 Martin Liska <mliska@suse.cz> PR sanitizer/81715 diff --git a/gcc/asan.c b/gcc/asan.c index 793da99cd2b..3a20723f15c 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1142,7 +1142,7 @@ asan_redzone_buffer::flush_redzone_payload (void) for (unsigned i = 0; i < RZ_BUFFER_SIZE; i++) { unsigned char v - = m_shadow_bytes[BYTES_BIG_ENDIAN ? RZ_BUFFER_SIZE - i : i]; + = m_shadow_bytes[BYTES_BIG_ENDIAN ? RZ_BUFFER_SIZE - i - 1 : i]; val |= (unsigned HOST_WIDE_INT)v << (BITS_PER_UNIT * i); if (dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "%02x ", v); |