mirror of
https://github.com/limine-bootloader/limine
synced 2025-03-08 10:51:25 +03:00
ext2: Fix bug where tokens were not appended a 0 terminator when examining path
This commit is contained in:
parent
352f74daef
commit
754f1a35b7
BIN
limine-pxe.bin
BIN
limine-pxe.bin
Binary file not shown.
BIN
limine.bin
BIN
limine.bin
Binary file not shown.
@ -214,13 +214,15 @@ static int ext2_parse_dirent(struct ext2_dir_entry *dir, struct ext2_file_handle
|
||||
struct ext2_inode current_inode = fd->root_inode;
|
||||
|
||||
bool escape = false;
|
||||
|
||||
char token[256] = {0};
|
||||
size_t i;
|
||||
|
||||
next:
|
||||
for (size_t i = 0; *path != '/' && *path != '\0'; i++, path++)
|
||||
for (i = 0; i < 255 && *path != '/' && *path != '\0'; i++, path++)
|
||||
token[i] = *path;
|
||||
|
||||
token[i] = 0;
|
||||
|
||||
if (*path == '\0')
|
||||
escape = true;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user