[xiph-commits] r9504 - icecast/branches/kh/icecast/src
karl at svn.xiph.org
karl at svn.xiph.org
Tue Jun 21 17:36:57 PDT 2005
Author: karl
Date: 2005-06-21 17:36:54 -0700 (Tue, 21 Jun 2005)
New Revision: 9504
Modified:
icecast/branches/kh/icecast/src/admin.c
Log:
set the length properly or else we may get some junk chars at the end
Modified: icecast/branches/kh/icecast/src/admin.c
===================================================================
--- icecast/branches/kh/icecast/src/admin.c 2005-06-21 22:19:38 UTC (rev 9503)
+++ icecast/branches/kh/icecast/src/admin.c 2005-06-22 00:36:54 UTC (rev 9504)
@@ -299,7 +299,8 @@
xmlDocDumpFormatMemoryEnc (doc, &buff, &len, NULL, 1);
buf_len = strlen (http) + len + 20;
client->refbuf = refbuf_new (buf_len);
- snprintf (client->refbuf->data, buf_len, "%s%d\r\n\r\n%s", http, len, buff);
+ len = snprintf (client->refbuf->data, buf_len, "%s%d\r\n\r\n%s", http, len, buff);
+ client->refbuf->len = len;
xmlFree(buff);
client->respcode = 200;
fserve_add_client (client, NULL);
More information about the commits
mailing list