merge-recursive: convert malloc / strcpy to strbuf