Fix wrong uses of string_copy() with pointer instead of buffer