mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 23:04:59 +00:00
GFileSystemModel: Don't copy the null-terminator after readlink()
This commit is contained in:
parent
8131875da6
commit
e7512ae2d1
1 changed files with 2 additions and 1 deletions
|
@ -75,7 +75,8 @@ bool GFileSystemModel::Node::fetch_data(const String& full_path, bool is_root)
|
|||
if (length < 0) {
|
||||
perror("readlink");
|
||||
} else {
|
||||
symlink_target = String(buffer, length);
|
||||
ASSERT(length > 0);
|
||||
symlink_target = String(buffer, length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue