diff options
| author | liang-kai-shui <1677378668@qq.com> | 2026-11-22 23:40:54 +0800 |
|---|---|---|
| committer | liang-kai-shui <1677378668@qq.com> | 2026-11-22 23:40:54 +0800 |
| commit | ea18a18b93354a0b95222cc9b1c69040981e44da (patch) | |
| tree | 4aef190e3840643deadddc4b1368252ca118e6c3 /runtime/src/pe_loader.cpp | |
| parent | 4eb6155d3ac4f9d3fadb0d095c4ce13e76783615 (diff) | |
pe_shader_containers: refuse report paths that overwrite an input
--json was written over whatever path it named after the scan, so
--json <image> replaced one of the input PE images (a synthetic image
with one DXBC container reproduced it: 52 bytes became a 356-byte JSON
array), --json missing/dir/report.json raised FileNotFoundError,
--json at the extract index silently replaced it, and --extract <file>
raised FileExistsError from os.makedirs. Guard the report paths the way
the other tools do (normcase+realpath, os.path.samefile fallback),
create the --json parent folder, and report write failures as one
ERROR line with exit 2.
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions