1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/lwext4: Ensure NULL termination of vfs dir name

This commit is contained in:
Teufelchen1 2024-04-16 11:39:16 +02:00
parent 7b4c80d1bf
commit b4267787ea

View File

@ -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;
}