Fix copying of device name to ifreq.

Don't overwrite the last NUL with strncpy() and also replace strcpy()
with strncpy().

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Fix Coverity warning in sk_interface_addr().

Copy the address directly to struct sockaddr_in or sockaddr_in6 instead
of sockaddr as Coverity doesn't seem to understand the union and reports
a buffer overflow.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>