diff options
author | Nick Clifton <nickc@redhat.com> | 2020-09-09 15:54:20 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-09-09 15:54:20 +0100 |
commit | ad2a37157d3476dffb3baf93ca5001c9f6c44bda (patch) | |
tree | 8d0820d582070a50354f4c873fb0704914e9c0b7 /contrib | |
parent | 5d3c12e4184a5e8d0cfda41e90bb2fcd98e7ddae (diff) | |
download | gcc-ad2a37157d3476dffb3baf93ca5001c9f6c44bda.zip gcc-ad2a37157d3476dffb3baf93ca5001c9f6c44bda.tar.gz gcc-ad2a37157d3476dffb3baf93ca5001c9f6c44bda.tar.bz2 |
If the lto plugin encounters a file with multiple symbol sections, each of which also has a v1 symbol extension section[1] then it will attempt to read the extension data for *every* symbol from each of the extension sections. This results in reading off the end of a buffer with the associated memory corruption that that entails. This patch fixes that problem.
2020-09-09 Nick Clifton <nickc@redhat.com>
* lto-plugin.c (struct plugin_symtab): Add last_sym field.
(parse_symtab_extension): Only read as many entries as are
available in the buffer. Store the data read into the symbol
table indexed from last_sym. Increment last_sym.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions