[Telepathy-commits] [telepathy-gabble/master] tube-stream: Fix off by one error in unix socket path initialization
Sjoerd Simons
sjoerd at luon.net
Tue Aug 19 10:52:52 PDT 2008
20080530122953-93b9a-155592c3c2f2ce79ef7da7e7c07b522f0bb5ef48.gz
---
src/tube-stream.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/tube-stream.c b/src/tube-stream.c
index e014444..850bf92 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -499,7 +499,7 @@ new_connection_to_socket (GabbleTubeStream *self,
addr.un.sun_family = PF_UNIX;
strncpy (addr.un.sun_path, array->data, sizeof (addr.un.sun_path) - 1);
- addr.un.sun_path[sizeof (addr.un.sun_path)] = '\0';
+ addr.un.sun_path[sizeof (addr.un.sun_path) - 1] = '\0';
len = sizeof (addr.un);
DEBUG ("Will try to connect to socket: %s", (const gchar *) array->data);
--
1.5.6.3
More information about the Telepathy-commits
mailing list