mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 01:29:46 +01:00
pkg/lwext4: Ensure NULL termination of vfs dir name
This commit is contained in:
parent
7b4c80d1bf
commit
b4267787ea
@ -462,6 +462,7 @@ static int _readdir(vfs_DIR *dirp, vfs_dirent_t *entry)
|
||||
}
|
||||
|
||||
strncpy(entry->d_name, (char *)dirent->name, sizeof(entry->d_name));
|
||||
entry->d_name[sizeof(entry->d_name) - 1] = '\0';
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user