mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:48:13 +00:00
LibELF: Ensure that DynamicLoader only receives absolute paths
While at it, start renaming variables where we know that they store a path, so that we will get less confused in the future.
This commit is contained in:
parent
a1de15498d
commit
177a5baf60
5 changed files with 23 additions and 16 deletions
|
@ -39,6 +39,8 @@ namespace ELF {
|
|||
|
||||
Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> DynamicLoader::try_create(int fd, String filename, String filepath)
|
||||
{
|
||||
VERIFY(filepath.starts_with('/'));
|
||||
|
||||
struct stat stat;
|
||||
if (fstat(fd, &stat) < 0) {
|
||||
return DlErrorMessage { "DynamicLoader::try_create fstat" };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue