cras_client: Fix compile-time strncpy errors

strncpy will generate errors like:

error: ‘strncpy’ output may be truncated copying {31, 63} bytes from a string
of length {31, 63}

in compiler.

`strncpy` won't help filling the terminal NULL char in the {32, 64}
position, so it's better to copy with full size and truncate the string
with NULL char explicitly.

BUG=none
TEST=make

Change-Id: Iae5773649ffc55b29f8d6d1c063f0601b7117a1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/2739775
Auto-Submit: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
1 file changed