Loading
PipeWireSourceStream: copy the cursor bitmap with its real size
spa_meta_bitmap::stride is in bytes (KWin sets it to width * 4), so the bitmap is stride * height bytes. Multiplying by 4 again copies three more bitmaps' worth from past the end of the cursor metadata. With the usual 24-48 px cursors that over-read tends to land in mapped memory and goes unnoticed, but with a large cursor it runs off the mapping: a 256 px cursor reads 1 MiB from a 256 KiB region, and krdpserver segfaults in memcpy in its PipeWireProduce thread as soon as a frame carries a cursor bitmap.
Seen with KPipeWire 6.7.5 and KWin 6.2.5 (nested, XCURSOR_SIZE=256), where every RDP connection crashed krdpserver within seconds.