mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
tools: rp2040: Drop uninitialized name length check
scan_dir() checked name_len before assigning it. Directory entries already compute and validate strlen(a_dirent->d_name) before allocating the dir item, while the root path passed to scan_dir() is not encoded as a directory entry name. Remove the stale pre-opendir check so scan_dir() no longer branches on an uninitialized local variable. Generated-by: OpenAI Codex Signed-off-by: aineoae86-sys <ai.neo.ae86@gmail.com>
This commit is contained in:
parent
1369a2875d
commit
95e4561145
1 changed files with 0 additions and 6 deletions
|
|
@ -237,12 +237,6 @@ int scan_dir(int in_sector)
|
|||
struct stat stat;
|
||||
int name_len;
|
||||
|
||||
if (name_len > max_name_len)
|
||||
{
|
||||
fprintf(stderr, "directory name to big. skipped. (%s)\n", path);
|
||||
return -1;
|
||||
}
|
||||
|
||||
input_dir = opendir(path);
|
||||
|
||||
if (input_dir == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue