diff options
Diffstat (limited to 'src/common/linux')
-rw-r--r-- | src/common/linux/dump_symbols.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index e561ad94..0eea2b54 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -963,13 +963,11 @@ bool InitModuleForElfClass(const typename ElfClass::Ehdr* elf_header, return false; } - string name; - char name_buf[NAME_MAX]; - memset(name_buf, 0, sizeof(name_buf)); - name = google_breakpad::ElfFileSoNameFromMappedFile(elf_header, name_buf, - sizeof(name_buf)) - ? name_buf - : google_breakpad::BaseName(obj_filename); + char name_buf[NAME_MAX] = {}; + std::string name = google_breakpad::ElfFileSoNameFromMappedFile( + elf_header, name_buf, sizeof(name_buf)) + ? name_buf + : google_breakpad::BaseName(obj_filename); // Add an extra "0" at the end. PDB files on Windows have an 'age' // number appended to the end of the file identifier; this isn't |