summaryrefslogtreecommitdiffstats
path: root/kfile-plugins/elf
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-02 03:51:24 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-02 03:51:24 -0600
commit6ddacfff536fc6fcedff929b315fd43c494bb02c (patch)
tree0712be5e179ecebd789a7d7cc1c4aff5c40796f2 /kfile-plugins/elf
parent84aea07a73ee724007513c157912385518f3dd7a (diff)
downloadtdelibs-6ddacfff536fc6fcedff929b315fd43c494bb02c.tar.gz
tdelibs-6ddacfff536fc6fcedff929b315fd43c494bb02c.zip
Fix remaining elficon problems
Diffstat (limited to 'kfile-plugins/elf')
-rw-r--r--kfile-plugins/elf/kfile_elf.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/kfile-plugins/elf/kfile_elf.cpp b/kfile-plugins/elf/kfile_elf.cpp
index dcc75081e..c657d245b 100644
--- a/kfile-plugins/elf/kfile_elf.cpp
+++ b/kfile-plugins/elf/kfile_elf.cpp
@@ -45,8 +45,8 @@ TQString elf_get_resource(libr_file *handle, char *section_name)
{
size_t buffer_size = 0;
char *buffer = NULL;
- TQString result = i18n("not set");
-
+ TQString result;
+
/* Get the resource from the ELF binary */
if(!libr_size(handle, section_name, &buffer_size))
{
@@ -54,14 +54,15 @@ TQString elf_get_resource(libr_file *handle, char *section_name)
return result;
}
/* Get the resource from the ELF file */
- buffer = (char *) malloc(buffer_size);
+ buffer = (char *) malloc(buffer_size+1);
+ buffer[buffer_size] = 0;
if(!libr_read(handle, section_name, buffer))
{
kdWarning() << "failed to obtain ELF resource: " << libr_errmsg() << endl;
goto fail;
}
result = buffer;
-
+
fail:
free(buffer);
@@ -147,9 +148,6 @@ bool KElfPlugin::readInfo( KFileMetaInfo& info, uint what)
break;
}
}
- if (iconListing.isEmpty()) {
- iconListing = i18n("not set");
- }
appendItem(group2, "EmbeddedIcon", iconListing);