public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, applied to mainline] tools-utils.cc: Fix potential crash when testing for CTF debug info
@ 2024-03-14 15:11 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2024-03-14 15:11 UTC (permalink / raw)
  To: libabigail

Hello,

When looking at something else, I stumbled upon a crash when testing
for the presence of CTF debug info.

	* src/abg-tools-utils.cc (file_has_ctf_debug_info): Do not crash
	on empty debug info paths.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to mainline.
---
 src/abg-tools-utils.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/abg-tools-utils.cc b/src/abg-tools-utils.cc
index 08d50347..2115113b 100644
--- a/src/abg-tools-utils.cc
+++ b/src/abg-tools-utils.cc
@@ -516,7 +516,7 @@ file_has_ctf_debug_info(const string& elf_file_path,
 
   // vmlinux.ctfa could be provided with --debug-info-dir
   for (const auto& path : debug_info_root_paths)
-    if (find_file_under_dir(*path, "vmlinux.ctfa", vmlinux))
+    if (path && *path && find_file_under_dir(*path, "vmlinux.ctfa", vmlinux))
       return true;
 
   return false;
-- 
2.39.3


-- 
		Dodji


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-14 15:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-14 15:11 [PATCH, applied to mainline] tools-utils.cc: Fix potential crash when testing for CTF debug info Dodji Seketeli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).