Signed frame length infinite loop
An AI generated this C parser to walk frames in a packet buffer, using a signed length. A fuzzer found an infinite loop and an out-of-bounds read. Identify the signedness / loop bug, the input that triggers each, and the fix.
Implement
walk_frames(buf: list[int], total: int) → list[int]Examples
in
[[2,65,66,3,67,68,69],7]out[2,3]in
[[255,65,66],3]out[]in
[[0,65],2]out[]What a strong answer looks like
Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.
0:00 of about 20 min
Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.
Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.
Run or narrate your approach, then ask the coach.