mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-14 08:49:50 +00:00
fix two uaf in anal.c
This commit is contained in:
parent
db28a0b20d
commit
8b957f8512
@ -1739,7 +1739,7 @@ R_API int r_core_anal_fcn_list(RCore *core, const char *input, int rad) {
|
||||
r_list_sort (fcns, &cmpfcn);
|
||||
fcnlist_gather_metadata (fcns);
|
||||
|
||||
if (input) { // input points to a filter argument
|
||||
if (input && *input) {// input points to a filter argument
|
||||
ut64 addr;
|
||||
addr = core->offset;
|
||||
if (*input) {
|
||||
@ -1782,7 +1782,8 @@ R_API int r_core_anal_fcn_list(RCore *core, const char *input, int rad) {
|
||||
fcn_list_default (core, fcns, false);
|
||||
break;
|
||||
}
|
||||
if (input) {
|
||||
//make sure you don't free core->anal->fcns
|
||||
if (input && core->anal->fcns != fcns) {
|
||||
// The list does not own the its members, so don't purge.
|
||||
free (fcns);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user