redjack/libcork — pull request #94 by dcreager (2014-10-31 14:41:49+00:00)
Title: cork_strndup should copy entire string

The `cork_strndup` and `cork_xstrndup` functions were using `strncpy` under the covers to make the copy of the incoming string. This truncates the copy at the first NUL byte. We want to copy the whole thing, so we should use `memcpy` instead.