Allocate the initial buffer for rdata based on the length of the string, to avoid reallocations and annoying messages.