mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-09 00:22:36 +02:00
Ext2FileSystem::readInode() should return an empty buffer for 0-length files.
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 18:49:27 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/750b27cb071
@@ -260,6 +260,9 @@ ByteBuffer Ext2FileSystem::readInode(InodeIdentifier inode) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (e2inode->i_size == 0)
|
||||
return ByteBuffer::createEmpty();
|
||||
|
||||
// Symbolic links shorter than 60 characters are store inline inside the i_block array.
|
||||
// This avoids wasting an entire block on short links. (Most links are short.)
|
||||
static const unsigned maxInlineSymlinkLength = 60;
|
||||
|
||||
Reference in New Issue
Block a user