Skip to content
Snippets Groups Projects
Commit ad2a3715 authored by Nick Clifton's avatar Nick Clifton
Browse files

If the lto plugin encounters a file with multiple symbol sections, each of...

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.
parent 5d3c12e4
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment