mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
dvb: Fix string copy wiht strlen() argument
This is a new warning introduced by gcc 8 We already check just before that we have enough space, just do a regular memcpy with the full string size. camswclient.c:87:3: error: ‘strncpy’ specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
This commit is contained in:
parent
5c7719ea74
commit
07a3bf0e8f
1 changed files with 1 additions and 1 deletions
|
@ -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, strlen (sock_path));
|
||||
memcpy (addr.sun_path, sock_path, strlen (sock_path) + 1);
|
||||
|
||||
GST_INFO ("connecting to softcam socket: %s", sock_path);
|
||||
if ((client->sock = socket (PF_UNIX, SOCK_STREAM, 0)) < 0) {
|
||||
|
|
Loading…
Reference in a new issue