mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +00:00
GFileSystemModel: Don't copy the null-terminator after readlink()
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user