summaryrefslogtreecommitdiffstats
path: root/tdefile-plugins
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2022-03-27 22:35:43 +0900
committerMichele Calgaro <[email protected]>2022-03-27 22:35:43 +0900
commita291f3a0a3fab073c009f77a36745c5c7bd48e9b (patch)
treeb47a7dc47280d46e45e627a7545a42240c7129a7 /tdefile-plugins
parent0970152d072a61355c77572abbf35b701aa800d3 (diff)
downloadtdelibs-a291f3a0a3fab073c009f77a36745c5c7bd48e9b.tar.gz
tdelibs-a291f3a0a3fab073c009f77a36745c5c7bd48e9b.zip
tdefile elf plugin: prevent SEGV when unable to open an ELF file. This resolves issue TDE/tdebase#262.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'tdefile-plugins')
-rw-r--r--tdefile-plugins/elf/tdefile_elf.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tdefile-plugins/elf/tdefile_elf.cpp b/tdefile-plugins/elf/tdefile_elf.cpp
index f3b399ed1..0b3a58490 100644
--- a/tdefile-plugins/elf/tdefile_elf.cpp
+++ b/tdefile-plugins/elf/tdefile_elf.cpp
@@ -97,6 +97,7 @@ bool KElfPlugin::readInfo( KFileMetaInfo& info, uint what)
if((handle = libr_open(const_cast<char*>(info.path().ascii()), access)) == NULL)
{
kdWarning() << "failed to open file" << info.path() << endl;
+ return false;
}
KFileMetaInfoGroup group = appendGroup(info, "Technical");