mirror of
https://github.com/QuasarApp/ELFIO.git
synced 2025-05-07 08:49:33 +00:00
Don't print \0 at the end of notes
This commit is contained in:
parent
e1044f2c49
commit
001833f402
@ -545,7 +545,7 @@ class dump
|
|||||||
Elf_Half no = reader.sections.size();
|
Elf_Half no = reader.sections.size();
|
||||||
for ( Elf_Half i = 0; i < no; ++i ) { // For all sections
|
for ( Elf_Half i = 0; i < no; ++i ) { // For all sections
|
||||||
section* sec = reader.sections[i];
|
section* sec = reader.sections[i];
|
||||||
if ( SHT_NOTE == sec->get_type() ) {
|
if ( SHT_NOTE == sec->get_type() ) { // Look at notes
|
||||||
note_section_accessor notes( reader, sec );
|
note_section_accessor notes( reader, sec );
|
||||||
int no_notes = notes.get_notes_num();
|
int no_notes = notes.get_notes_num();
|
||||||
if ( no > 0 ) {
|
if ( no > 0 ) {
|
||||||
@ -559,6 +559,8 @@ class dump
|
|||||||
Elf_Word descsz;
|
Elf_Word descsz;
|
||||||
|
|
||||||
notes.get_note( j, type, name, desc, descsz );
|
notes.get_note( j, type, name, desc, descsz );
|
||||||
|
// 'name' usually contains \0 at the end. Try to fix it
|
||||||
|
name = name.c_str();
|
||||||
note( out, j, type, name );
|
note( out, j, type, name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user