Make sure string returned by my_strndup is null terminated