Repository navigation
[finsh] bound path auto-complete buffer copies - #12057
cms19859230182-lang wants to merge 1 commit into
Conversation
Fix RT-Thread#11839 In msh_auto_complete_path(), when the user inputs an excessively long path string that exceeds DFS_PATH_MAX, attempting to concatenate and resolve directory components in the fixed-size full_path buffer could trigger a heap buffer overflow. Check that the input path length does not exceed DFS_PATH_MAX before allocating the buffer and attempting path resolution, aborting completion safely when input is oversized.
|
在 |
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
📌 Code Review Assignment🏷️ Tag: componentsReviewers: @Maihuanyi Changed Files (Click to expand)
📊 Current Review Status (Last Updated: 2026-11-14 19:18 CST)
📝 Review Instructions
|
|
中文
msh_auto_complete_path()在遇到超长输入路径时试图拼接入固定大小缓冲区可能导致的堆溢出。msh_auto_complete_pathvia Oversized Input #11839。English
msh_auto_complete_path(), enforce boundary checks on the input path string length before attempting path resolution.DFS_PATH_MAX, preventing heap buffer overflow.msh_auto_complete_pathvia Oversized Input #11839.