[xiph-commits] r7762 - icecast/branches/kh/icecast/src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Wed Sep 15 08:53:33 PDT 2004


Author: karl
Date: 2004-09-15 08:53:33 -0700 (Wed, 15 Sep 2004)
New Revision: 7762

Modified:
   icecast/branches/kh/icecast/src/admin.c
Log:
don't refer to config variables outside of its lock, and make sure the
xml data does not get treated as a conversion string


Modified: icecast/branches/kh/icecast/src/admin.c
===================================================================
--- icecast/branches/kh/icecast/src/admin.c	2004-09-15 14:21:04 UTC (rev 7761)
+++ icecast/branches/kh/icecast/src/admin.c	2004-09-15 15:53:33 UTC (rev 7762)
@@ -263,18 +263,17 @@
                "Content-Length: %d\r\n"
                "Content-Type: text/xml\r\n"
                "\r\n", len);
-        html_write(client, buff);
+        html_write(client, "%s", buff);
     }
     if (response == TRANSFORMED) {
         config = config_get_config();
         adminwebroot = config->adminroot_dir;
-        config_release_config();
         fullpath_xslt_template_len = strlen(adminwebroot) + 
             strlen(xslt_template) + 2;
         fullpath_xslt_template = malloc(fullpath_xslt_template_len);
-        memset(fullpath_xslt_template, '\000', fullpath_xslt_template_len);
         snprintf(fullpath_xslt_template, fullpath_xslt_template_len, "%s%s%s",
             adminwebroot, PATH_SEPARATOR, xslt_template);
+        config_release_config();
         html_write(client, "HTTP/1.0 200 OK\r\n"
                "Content-Type: text/html\r\n"
                "\r\n");



More information about the commits mailing list