------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-08-15 14:22 ------- (In reply to comment #2) > Why do you need to special case len == 0? The other strings aren't NUL > terminated either.
The zero-termination is just a detail to avoid keeping memory uninitialized. The thing is that *dest should not be NULL, and malloc(0) will return NULL. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33079