diff options
author | Matthew Malcomson <matthew.malcomson@arm.com> | 2019-11-05 15:35:15 +0000 |
---|---|---|
committer | Matthew Malcomson <matmal01@gcc.gnu.org> | 2019-11-05 15:35:15 +0000 |
commit | 81e40f3ae4a35b55ff2733a73d48a2f063aa5721 (patch) | |
tree | 31411153d8ba79db38354ef07f87db0ef01a7142 /gcc/expr.c | |
parent | 4330d1c477ab75ec9dc9e3b65d2fad664eb91a76 (diff) | |
download | gcc-81e40f3ae4a35b55ff2733a73d48a2f063aa5721.zip gcc-81e40f3ae4a35b55ff2733a73d48a2f063aa5721.tar.gz gcc-81e40f3ae4a35b55ff2733a73d48a2f063aa5721.tar.bz2 |
[aarch64] Allocate space for err_str in aarch64_handle_attr_branch_protection
-fsanitize=hwaddress found a one-byte overwrite when running the
testsuite here. aarch64_handle_attr_branch_protection allocates
`strlen(str)` bytes for an error string, which is populated by
`strcpy(..., str)` in the case where the branch protection string is
completely invalid.
Not tested -- I don't want to re-build and it seems obvious.
gcc/ChangeLog:
2019-11-05 Matthew Malcomson <matthew.malcomson@arm.com>
* config/aarch64/aarch64.c (aarch64_handle_attr_cpu): Allocate
enough bytes for the NULL character.
From-SVN: r277845
Diffstat (limited to 'gcc/expr.c')
0 files changed, 0 insertions, 0 deletions