summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf58528)
raw | patch | inline | side by side (parent: cf58528)
author | René Rebe <rene@exactcode.de> | |
Tue, 13 May 2008 08:11:00 +0000 (10:11 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Tue, 13 May 2008 09:59:12 +0000 (11:59 +0200) |
Hi,
while updating our T2 SDE (http://www.t2-project.org) package I
noticed some out-of-bounds acces in the teamspeak2 support:
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
while updating our T2 SDE (http://www.t2-project.org) package I
noticed some out-of-bounds acces in the teamspeak2 support:
Signed-off-by: Florian Forster <octo@huhu.verplant.org>
src/teamspeak2.c | patch | blob | history |
diff --git a/src/teamspeak2.c b/src/teamspeak2.c
index b7992d808524ded44b81678cd8da890a8970546f..52a1007ed4fcddd300955d3dbd55c40268830e53 100644 (file)
--- a/src/teamspeak2.c
+++ b/src/teamspeak2.c
@@ -389,7 +389,7 @@ static int tss2_select_vserver (FILE *read_fh, FILE *write_fh, vserver_list_t *v
ERROR ("teamspeak2 plugin: tss2_receive_line failed.");
return (-1);
}
- response[sizeof (response)] = 0;
+ response[sizeof (response) - 1] = 0;
/* Check answer */
if ((strncasecmp ("OK", response, 2) == 0)
ERROR ("teamspeak2 plugin: tss2_receive_line failed.");
return (-1);
}
- buffer[sizeof (buffer)] = 0;
+ buffer[sizeof (buffer) - 1] = 0;
if (strncmp ("average_packet_loss=", buffer,
strlen ("average_packet_loss=")) == 0)