mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-15 05:01:13 +08:00
libctf: fix use-after-free in function dumping
This is actually a free-before-initializing (i.e. a free of garbage). libctf/ * ctf-dump.c (ctf_dump_funcs): Free in the right place.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2019-06-03 Nick Alcock <nick.alcock@oracle.com>
|
||||||
|
|
||||||
|
* ctf-dump.c (ctf_dump_funcs): Free in the right place.
|
||||||
|
|
||||||
2019-05-29 Nick Alcock <nick.alcock@oracle.com>
|
2019-05-29 Nick Alcock <nick.alcock@oracle.com>
|
||||||
|
|
||||||
* Makefile.am (ZLIB): New.
|
* Makefile.am (ZLIB): New.
|
||||||
|
@ -273,7 +273,6 @@ ctf_dump_funcs (ctf_file_t *fp, ctf_dump_state_t *state)
|
|||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
str = ctf_str_append (str, " ");
|
str = ctf_str_append (str, " ");
|
||||||
free (bit);
|
|
||||||
|
|
||||||
/* Function name. */
|
/* Function name. */
|
||||||
|
|
||||||
@ -290,6 +289,7 @@ ctf_dump_funcs (ctf_file_t *fp, ctf_dump_state_t *state)
|
|||||||
}
|
}
|
||||||
str = ctf_str_append (str, bit);
|
str = ctf_str_append (str, bit);
|
||||||
str = ctf_str_append (str, " (");
|
str = ctf_str_append (str, " (");
|
||||||
|
free (bit);
|
||||||
|
|
||||||
/* Function arguments. */
|
/* Function arguments. */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user