summaryrefslogtreecommitdiffstats
path: root/server-fn.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-09-28 21:08:30 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-09-28 21:08:30 +0000
commit4d6cfe5f22d6618cdd522661e1e7c4363a72638c (patch)
tree1d5aac7fd7c8fa09e96a490641b314b4736517a2 /server-fn.c
parent599046168820193686960a1a89411bb4f878daf5 (diff)
Terminate buffers properly.
Diffstat (limited to 'server-fn.c')
-rw-r--r--server-fn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server-fn.c b/server-fn.c
index af326b02..97c16a6d 100644
--- a/server-fn.c
+++ b/server-fn.c
@@ -1,4 +1,4 @@
-/* $Id: server-fn.c,v 1.5 2007-09-27 10:09:37 nicm Exp $ */
+/* $Id: server-fn.c,v 1.6 2007-09-28 21:08:30 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -31,6 +31,7 @@ server_find_sessid(struct sessid *sid, char **cause)
u_int i, n;
if (*sid->name != '\0') {
+ sid->name[(sizeof sid->name) - 1] = '\0';
if ((s = session_find(sid->name)) == NULL) {
xasprintf(cause, "session not found: %s", sid->name);
return (NULL);