diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2015-10-16 20:00:00 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2015-10-16 20:00:00 (GMT) |
commit | 5fcd4f54c5ca87ca9dfd9529d7b83bbec9aff64a (patch) | |
tree | 033981b0662791abf274ad33b4f33d47c3437382 /src/format/elf | |
parent | a30fc1056877860593c19498738775c0ac43794d (diff) |
Prevented some mistakes pointed by Melkor.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@599 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/format/elf')
-rw-r--r-- | src/format/elf/section.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/format/elf/section.c b/src/format/elf/section.c index 2b46d9e..60bd67a 100644 --- a/src/format/elf/section.c +++ b/src/format/elf/section.c @@ -93,9 +93,8 @@ bool find_elf_section_by_name(const GElfFormat *format, const char *name, elf_sh secname = extract_name_from_elf_string_section(format, &strings, ELF_SHDR(format, *section, sh_name)); - /* FIXME : if secname == NULL */ - - result = (strcmp(name, secname) == 0); + if (secname != NULL) + result = (strcmp(name, secname) == 0); } |