fix(qr): bound multipart parser resources - #150
Conversation
|
thank you. I reviewed final commit b9a09c9 and agree with your changes. The allocation-failure distinction and scanner message, incomplete-PMOFN compatibility, added fault-injection tests, cleanup target, and documentation all improve the patch. I reran the focused parser tests, ASan/UBSan, full host suite, formatting checks, and the wave_43 firmware build. Everything passed, and the host test source remains excluded from the firmware. One non-blocking follow-up observation: alloc_failed currently covers part-storage allocations, but an allocation failure in ur_decoder_new() remains non-terminal, while initial BBQr metadata allocation failure is reported as generic invalid input. This is not caused by your changes and does not change my agreement with the commit. I’m happy to address it separately if you think it would be useful. Thanks again for preserving the authorship and improving the contribution. |
Problem
Hostile or inconsistent PMOFN/BBQr sequences could grow retained allocations before final assembly checks.
Changes
scripts/test.sh.Verification
./scripts/test.sh): pass.wave_43ESP-IDF v6.0.2 build: pass.Compatibility / risk
Valid PMOFN, BBQr, UR, and plain flows remain tested. Sequences above the new limits fail closed.