ITADN

fix: add buffer-length check in cfg.c

#252Pull Requestorbisai0security 创建于 2026-05-26
## Summary Fix critical severity security issue in `src/cfg.c`. ## Vulnerability | Field | Value | |-------|-------| | **ID** | V-001 | | **Severity** | CRITICAL | | **Scanner** | multi_agent_ai | | **Rule** | `V-001` | | **File** | `src/cfg.c:570` | | **CWE** | CWE-120 | **Description**: The configuration parser uses strcpy() to copy cfg->file_path into a fixed-size local stack buffer 'path' without any bounds checking at lines 570 and 575. If the file_path value from the configuration file exceeds the destination buffer size, this results in a classic stack buffer overflow that can overwrite the return address. ## Changes - `src/cfg.c` ## Verification - [x] Build passes - [x] Scanner re-scan confirms fix - [x] LLM code review passed --- *Automated security fix by [OrbisAI Security](https://orbisappsec.com)*
合并状态:未合并 关闭于 2026-05-26 1 条评论