diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2010-02-02 17:35:15 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2010-06-03 15:27:42 -0400 |
commit | d2731d689de81b839d49eced9f23ec858ed246a4 (patch) | |
tree | 67dbe6042da5d6cdcaca8e0546f97d29d2a66619 /gst | |
parent | 2c02d0c0e42a0de911ca1cbc6fa8d7559bfc11cf (diff) | |
download | gstreamer-plugins-bad-d2731d689de81b839d49eced9f23ec858ed246a4.tar.gz |
shmpipe: Fix one byte overflow
Diffstat (limited to 'gst')
-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) |