Fix xstrndup() bug.

Now there's a second user... the libc function already null terminates
at len+1, and it doesn't malloc the full size if strlen() smaller so
the redundant termination stomped unallocated memory. Oops.

sort.c never noticed because it calculated length to truncate or copy
existing string, so never hit this.
1 file changed