mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-09 14:01:06 +03:00
`set_stream_offset` indexed `self.files` directly. Its only guard is the `self.file_num() == r.file_num` check in `confirm()`, and `file_num` counts up past every file, so it equals `files.len()` once the job is done -- read_frame at :849 treats exactly that value as "job done". A peer that then sends `send_confirm` with the matching file_num and a non-zero OffsetBlk gets through the equality check and off the end of the slice. Every other site indexing `files` in this file already bounds-checks; this was the one that did not. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab