dds: validate source buffer size before copying