diff options
Diffstat (limited to 'gst/shm/shmpipe.c')
-rw-r--r-- | gst/shm/shmpipe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/shm/shmpipe.c b/gst/shm/shmpipe.c index f7619b70b..82a4c3ccf 100644 --- a/gst/shm/shmpipe.c +++ b/gst/shm/shmpipe.c @@ -187,7 +187,7 @@ sp_writer_create (const char *path, size_t size, mode_t perms) } sun.sun_family = AF_UNIX; - strncpy (sun.sun_path, path, sizeof (sun.sun_path)); + strncpy (sun.sun_path, path, sizeof (sun.sun_path) - 1); while (bind (self->main_socket, (struct sockaddr *) &sun, sizeof (struct sockaddr_un)) < 0) { @@ -686,7 +686,7 @@ sp_client_open (const char *path) } sun.sun_family = AF_UNIX; - strncpy (sun.sun_path, path, sizeof (sun.sun_path)); + strncpy (sun.sun_path, path, sizeof (sun.sun_path) - 1); if (connect (self->main_socket, (struct sockaddr *) &sun, sizeof (struct sockaddr_un)) < 0) |