mirror of
https://github.com/QuasarApp/LIEF.git
synced 2025-04-28 05:14:33 +00:00
Merge pull request #212 from hillu/c-api-content-size
api/c: Add explict size fields for extracted content fields
This commit is contained in:
commit
c4524ea6f1
@ -44,6 +44,7 @@ void init_c_segments(Macho_Binary_t* c_binary, Binary* binary) {
|
||||
c_binary->segments[i]->numberof_sections = segment.numberof_sections();
|
||||
c_binary->segments[i]->flags = segment.flags();
|
||||
c_binary->segments[i]->content = content;
|
||||
c_binary->segments[i]->size = segment_content.size();
|
||||
c_binary->segments[i]->sections = nullptr; //TODO
|
||||
}
|
||||
|
||||
|
@ -43,6 +43,7 @@ void init_c_sections(Pe_Binary_t* c_binary, Binary* binary) {
|
||||
c_binary->sections[i]->pointerto_line_numbers = b_section.pointerto_line_numbers();
|
||||
c_binary->sections[i]->characteristics = b_section.characteristics();
|
||||
c_binary->sections[i]->content = content;
|
||||
c_binary->sections[i]->content_size = section_content.size();
|
||||
c_binary->sections[i]->entropy = b_section.entropy();
|
||||
}
|
||||
c_binary->sections[sections.size()] = nullptr;
|
||||
|
@ -41,6 +41,7 @@ struct Macho_Segment_t {
|
||||
uint32_t numberof_sections;
|
||||
uint32_t flags;
|
||||
uint8_t* content;
|
||||
uint64_t size;
|
||||
Macho_Section_t** sections;
|
||||
};
|
||||
|
||||
|
@ -43,6 +43,7 @@ struct Pe_Section_t {
|
||||
uint32_t characteristics;
|
||||
|
||||
uint8_t* content;
|
||||
uint64_t content_size;
|
||||
double entropy;
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user