diff options
| author | jvinpe <jvinpe@gmail.com> | 2026-11-22 14:26:55 -0300 |
|---|---|---|
| committer | jvinpe <jvinpe@gmail.com> | 2026-11-22 14:27:56 -0300 |
| commit | e739047d4da8212463454fd5b0dc0e239151b6dd (patch) | |
| tree | 559e7945ec3d460078eadba152e330ab94b9eff5 /runtime/test/gameinput_test.cpp | |
| parent | 49475796c226c8511b9470bf97a4daf57b8af323 (diff) | |
pe_inspect: name the header a short file stops before, not a missing signature
A 4-byte truncated copy that starts with MZ was rejected as "no MZ header",
but the signature is there: the file is just shorter than the 64-byte MS-DOS
header that carries e_lfanew at 0x3c. The same class of wrong cause sat one
check later, where a cut before or inside the PE header said "no PE signature"
even when PE\0\0 was present and only the bytes after it were missing. The
signature and the length are now checked apart, each reporting its real cause.
Tested with the new ShortHeaderTest (hand-built bytes, parser and CLI paths):
4 of its 6 cases fail without the parser change; the suite runs 50 tests, all
passing, 1 Windows-only skip.
AI-assisted: written by Qwen (model qwen3.8-gx10-claude-compatible).
Co-Authored-By: Qwen qwen3.8-gx10-claude-compatible <noreply@qwen.ai>
Diffstat (limited to 'runtime/test/gameinput_test.cpp')
0 files changed, 0 insertions, 0 deletions