strdup() now does this. If someone resizes strdup()-ed memory, nothing bad will happen, they will just take a small performance hit the first time. But I think realloc-ing strdup()-ed memory is rare, that's why I did this.