doc: delimit sections
set_readfunction: assert correct length, do not silently truncate data