summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2022-03-27 22:35:43 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2022-03-27 22:46:25 +0900
commit8905a8003ddefcb8f57608b48585f98f7ac93958 (patch)
tree7082243125061c609d6c8bc3500b81afdebb397b
parent976094c6b99cecbe9f21399af30fb167fb731610 (diff)
downloadtdelibs-8905a8003ddefcb8f57608b48585f98f7ac93958.tar.gz
tdelibs-8905a8003ddefcb8f57608b48585f98f7ac93958.zip
tdefile elf plugin: prevent SEGV when unable to open an ELF file. This resolves issue TDE/tdebase#262.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit a291f3a0a3fab073c009f77a36745c5c7bd48e9b)
-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");