diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-03-27 22:35:43 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-03-27 22:46:25 +0900 |
commit | 8905a8003ddefcb8f57608b48585f98f7ac93958 (patch) | |
tree | 7082243125061c609d6c8bc3500b81afdebb397b | |
parent | 976094c6b99cecbe9f21399af30fb167fb731610 (diff) | |
download | tdelibs-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.cpp | 1 |
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"); |