Skip to content

Commit

Permalink
Remove 'RzBinPEObj.endian' and use 'RzBinPEObj.big_endian' instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Roeegg2 committed Nov 11, 2024
1 parent 7b16f63 commit 52a16eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion librz/bin/format/pe/pe.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ struct PE_(rz_bin_pe_obj_t) {
int import_directory_size;
ut64 size;
int num_sections;
int endian;
bool verbose;
int big_endian;
RzList /*<Pe_image_rich_entry *>*/ *rich_entries;
Expand Down
4 changes: 2 additions & 2 deletions librz/bin/format/pe/pe_exports.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ struct rz_bin_pe_export_t *PE_(rz_bin_pe_get_exports)(RzBinPEObj *bin) {
}
for (i = 0; i < bin->export_directory->NumberOfFunctions; i++) {
// get vaddr from AddressOfFunctions array
function_rva = rz_read_at_ble32((ut8 *)func_rvas, i * sizeof(PE_VWord), bin->endian);
function_rva = rz_read_at_ble32((ut8 *)func_rvas, i * sizeof(PE_VWord), bin->big_endian);
// have exports by name?
if (bin->export_directory->NumberOfNames > 0) {
// search for value of i into AddressOfOrdinals
name_vaddr = 0;
for (n = 0; n < bin->export_directory->NumberOfNames; n++) {
PE_Word fo = rz_read_at_ble16((ut8 *)ordinals, n * sizeof(PE_Word), bin->endian);
PE_Word fo = rz_read_at_ble16((ut8 *)ordinals, n * sizeof(PE_Word), bin->big_endian);
// if exist this index into AddressOfOrdinals
if (i == fo) {
function_ordinal = fo;
Expand Down

0 comments on commit 52a16eb

Please sign in to comment.