diff options
| author | seteiro <[email protected]> | 2026-11-10 10:17:34 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-11-13 09:32:11 +0800 |
| commit | 2501d45cdd9e34d5810e8c61b55b20d7340de224 (patch) | |
| tree | 715f7662707cfdc968045a65af33079b24edfe7c /components/rust/docs/4.modules | |
| parent | 20feab6ad387042ef2be5980afec2f3c26974537 (diff) | |
[finsh] bound path construction in msh file helpers
Fix #8286 (CVE-2024-25390).
- msh_file.c: reject "%s/%s" paths whose length plus NUL exceeds
DFS_PATH_MAX in directory_delete_for_msh() and directory_setattr(),
and format with rt_snprintf() instead of rt_sprintf().
- msh.c: pass the remaining line-buffer capacity into
msh_auto_complete_path(), bound the cwd/parent-path assembly, replace
the unbounded d_name copy with rt_strnlen()/rt_memcpy(), and only
append the completion and trailing '/' when they fit.
No global path limit or DFS core changes.
Diffstat (limited to 'components/rust/docs/4.modules')
0 files changed, 0 insertions, 0 deletions
