1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

a couple of potential bad pointer type problems

svn path=/icecast/trunk/icecast/; revision=8095
This commit is contained in:
Karl Heyes 2004-10-25 15:42:04 +00:00
parent 7e3c9bc087
commit 000a33b9cb

View File

@ -241,18 +241,17 @@ void admin_send_response(xmlDocPtr doc, client_t *client,
"Content-Length: %d\r\n" "Content-Length: %d\r\n"
"Content-Type: text/xml\r\n" "Content-Type: text/xml\r\n"
"\r\n", len); "\r\n", len);
html_write(client, buff); html_write(client, "%s", buff);
} }
if (response == TRANSFORMED) { if (response == TRANSFORMED) {
config = config_get_config(); config = config_get_config();
adminwebroot = config->adminroot_dir; adminwebroot = config->adminroot_dir;
config_release_config();
fullpath_xslt_template_len = strlen(adminwebroot) + fullpath_xslt_template_len = strlen(adminwebroot) +
strlen(xslt_template) + 2; strlen(xslt_template) + 2;
fullpath_xslt_template = malloc(fullpath_xslt_template_len); 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", snprintf(fullpath_xslt_template, fullpath_xslt_template_len, "%s%s%s",
adminwebroot, PATH_SEPARATOR, xslt_template); adminwebroot, PATH_SEPARATOR, xslt_template);
config_release_config();
html_write(client, "HTTP/1.0 200 OK\r\n" html_write(client, "HTTP/1.0 200 OK\r\n"
"Content-Type: text/html\r\n" "Content-Type: text/html\r\n"
"\r\n"); "\r\n");