diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-09-28 21:08:30 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-09-28 21:08:30 +0000 |
commit | 4d6cfe5f22d6618cdd522661e1e7c4363a72638c (patch) | |
tree | 1d5aac7fd7c8fa09e96a490641b314b4736517a2 /server-msg.c | |
parent | 599046168820193686960a1a89411bb4f878daf5 (diff) | |
download | rtmux-4d6cfe5f22d6618cdd522661e1e7c4363a72638c.tar.gz rtmux-4d6cfe5f22d6618cdd522661e1e7c4363a72638c.tar.bz2 rtmux-4d6cfe5f22d6618cdd522661e1e7c4363a72638c.zip |
Terminate buffers properly.
Diffstat (limited to 'server-msg.c')
-rw-r--r-- | server-msg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server-msg.c b/server-msg.c index 4d84a3d3..8a680018 100644 --- a/server-msg.c +++ b/server-msg.c @@ -1,4 +1,4 @@ -/* $Id: server-msg.c,v 1.5 2007-09-27 09:52:03 nicm Exp $ */ +/* $Id: server-msg.c,v 1.6 2007-09-28 21:08:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -112,6 +112,7 @@ server_msg_fn_new(struct hdr *hdr, struct client *c) if (c->sy == 0) c->sy = 25; + data.name[(sizeof data.name) - 1] = '\0'; if (*data.name != '\0' && session_find(data.name) != NULL) { xasprintf(&msg, "duplicate session: %s", data.name); server_write_client(c, MSG_ERROR, msg, strlen(msg)); |