Skip to content

Commit

Permalink
fix declared fields in the dex module
Browse files Browse the repository at this point in the history
There was some mismatch between the declared fields and the ones filled
by the module:

- `dex.field[*].static` and `dex.field[*].instance` were defined, but
  not declared, making their use impossible. They are now properly
  declared.

- several fields in `dex.method[*].code_item` were declared but never
  defined: `padding`, `tries` and `handlers`. Those are removed since
  they couldn't have been used.
  • Loading branch information
vthib committed Apr 24, 2024
1 parent 6604b16 commit 42f7aa1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions libyara/modules/dex/dex.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,8 @@ begin_declarations
declare_string("class_name");
declare_string("name");
declare_string("proto");
declare_integer("static");
declare_integer("instance");
declare_integer("field_idx_diff");
declare_integer("access_flags");
end_struct_array("field")
Expand Down Expand Up @@ -358,11 +360,6 @@ begin_declarations
declare_integer("debug_info_off");
declare_integer("insns_size");
declare_string("insns");
declare_integer("padding");
begin_struct("tries")
end_struct("tries");
begin_struct_array("handlers")
end_struct_array("handlers");
end_struct("code_item")
end_struct_array("method")
end_declarations
Expand Down

0 comments on commit 42f7aa1

Please sign in to comment.