dvb: Fix sock_addr usage (for real)

It was great checking that the string was not too big ... but
it's better if we actually copy the proper amount of bytes :)

CID #206004
This commit is contained in:
Edward Hervey 2017-11-23 08:12:03 +01:00 committed by Edward Hervey
parent 5706178d54
commit e12a86995e

View file

@ -84,7 +84,7 @@ cam_sw_client_open (CamSwClient * client, const char *sock_path)
}
addr.sun_family = AF_UNIX;
strncpy (addr.sun_path, sock_path, sizeof (addr.sun_path));
strncpy (addr.sun_path, sock_path, sizeof (sock_path));
GST_INFO ("connecting to softcam socket: %s", sock_path);
if ((client->sock = socket (PF_UNIX, SOCK_STREAM, 0)) < 0) {