mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
PR24427, bfd/doc/chew.c reads uninitialized memory and subtracts from function pointer
PR 24427 * doc/chew.c (free_words): Correctly free "push_text" strings.
This commit is contained in:

committed by
Alan Modra

parent
a5def729be
commit
b05971a652
@ -1,3 +1,8 @@
|
|||||||
|
2019-04-10 Michael Forney <mforney@mforney.org>
|
||||||
|
|
||||||
|
PR 24427
|
||||||
|
* doc/chew.c (free_words): Correctly free "push_text" strings.
|
||||||
|
|
||||||
2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
|
2019-04-08 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
* config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
|
* config.bfd: Remove i[3-7]86-*-kaos* and i[3-7]86-*-chaos targets.
|
||||||
|
@ -1260,11 +1260,11 @@ free_words (void)
|
|||||||
if (ptr->code)
|
if (ptr->code)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < ptr->code_length; i ++)
|
for (i = 0; i < ptr->code_end - 1; i ++)
|
||||||
if (ptr->code[i] == push_text
|
if (ptr->code[i] == push_text
|
||||||
&& ptr->code[i + 1])
|
&& ptr->code[i + 1])
|
||||||
{
|
{
|
||||||
free (ptr->code[i + 1] - 1);
|
free ((char *) ptr->code[i + 1] - 1);
|
||||||
++ i;
|
++ i;
|
||||||
}
|
}
|
||||||
free (ptr->code);
|
free (ptr->code);
|
||||||
|
Reference in New Issue
Block a user