Files
RASCSI/cpp
Daniel Markstedt fec28e6795 bound CD-ROM READ TOC allocation length to the transfer buffer
READ TOC receives its allocation length from the initiator’s CDB and accepts values up to 65535 bytes. The controller’s transfer buffer is normally only 4096 bytes, so using that value directly could overrun the buffer and report more data than can be transferred.

Clamp the response length to the available buffer size and clear only that bounded range before constructing the response. Also bound the start-track scan before dereferencing the track vector, allowing a lead-out (0xAA) request to safely produce its descriptor when no matching track exists.

Add regression tests for the maximum allocation length and for READ TOC lead-out handling.
2026-08-11 07:05:54 +02:00
..
2026-08-02 23:18:40 +02:00
2026-08-02 23:18:40 +02:00
2026-08-01 12:30:27 +02:00