From a291f3a0a3fab073c009f77a36745c5c7bd48e9b Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 27 Mar 2022 22:35:43 +0900 Subject: [PATCH] tdefile elf plugin: prevent SEGV when unable to open an ELF file. This resolves issue TDE/tdebase#262. Signed-off-by: Michele Calgaro --- tdefile-plugins/elf/tdefile_elf.cpp | 1 + 1 file changed, 1 insertion(+) 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(info.path().ascii()), access)) == NULL) { kdWarning() << "failed to open file" << info.path() << endl; + return false; } KFileMetaInfoGroup group = appendGroup(info, "Technical");