diff options
author | Tim Schumacher <timschumi@gmx.de> | 2021-11-05 21:00:51 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-10 14:42:49 +0100 |
commit | 31c634be5a4e9447a8dd48e34161bebbfdb67b2c (patch) | |
tree | cef2d0444e48325708be25da0d900ae41a3941e9 /Userland/Libraries/LibCoredump | |
parent | d350d2dfcea2f14fa73c46b4f91f26f00e4ad325 (diff) | |
download | serenity-31c634be5a4e9447a8dd48e34161bebbfdb67b2c.zip |
LibCoredump: Restrict library name check when querying symbols
`object_name()` already returns the cleaned library name, and we
currently don't have any libraries with suffixes in /usr/lib, so we can
convert this to an `ends_with()` check.
Diffstat (limited to 'Userland/Libraries/LibCoredump')
-rw-r--r-- | Userland/Libraries/LibCoredump/Reader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibCoredump/Reader.cpp b/Userland/Libraries/LibCoredump/Reader.cpp index 907ccc8257..672da0c29d 100644 --- a/Userland/Libraries/LibCoredump/Reader.cpp +++ b/Userland/Libraries/LibCoredump/Reader.cpp @@ -273,7 +273,7 @@ const Reader::LibraryData* Reader::library_containing(FlatPtr address) const auto name = region->object_name(); String path; - if (name.contains(".so")) + if (name.ends_with(".so")) path = String::formatted("/usr/lib/{}", name); else { path = name; |