mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:27:35 +00:00
LibCoredump: Fix use-after-free in Backtrace::object_info_for_region()
The first line was creating a StringView object with region name. Then, if the path didn't start with '/', it had assigned a String made from a temporary LexicalPath join result. This fixes the bug that only main executable's frames were displayed.
This commit is contained in:
parent
d5183cb7ac
commit
394227b2f9
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ namespace Coredump {
|
||||||
|
|
||||||
ELFObjectInfo const* Backtrace::object_info_for_region(MemoryRegionInfo const& region)
|
ELFObjectInfo const* Backtrace::object_info_for_region(MemoryRegionInfo const& region)
|
||||||
{
|
{
|
||||||
auto path = region.object_name();
|
String path = region.object_name();
|
||||||
if (!path.starts_with('/') && Core::File::looks_like_shared_library(path))
|
if (!path.starts_with('/') && Core::File::looks_like_shared_library(path))
|
||||||
path = LexicalPath::join("/usr/lib", path).string();
|
path = LexicalPath::join("/usr/lib", path).string();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue