http://code.google.com/p/canopy-httpd/source/detail?r=1103
Modified:
/trunk/src/lib/canopy/buf.c
/trunk/src/lib/http/msg.c
/trunk/src/modules/mod_dir_index/mod_dir_index.c
/trunk/src/sbin/httpd/handlers.c
=======================================
--- /trunk/src/lib/canopy/buf.c Sun May 2 12:28:01 2010
+++ /trunk/src/lib/canopy/buf.c Wed Dec 1 19:09:21 2010
@@ -41,6 +41,7 @@
#include "buf.h"
#include "log.h"
#include "mem.h"
+#include "string.h"
#include "private.h"
@@ -419,7 +420,7 @@
va_list vap;
va_start(vap, fmt);
- ret = vasprintf(&str, fmt, vap);
+ ret = cnp_vasprintf(&str, fmt, vap);
va_end(vap);
if (ret == -1)
=======================================
--- /trunk/src/lib/http/msg.c Tue Apr 20 20:51:21 2010
+++ /trunk/src/lib/http/msg.c Wed Dec 1 19:09:21 2010
@@ -210,7 +210,7 @@
http_hdr_t *hdr;
va_start(args, fmt);
- ret = vasprintf(&val, fmt, args);
+ ret = cnp_vasprintf(&val, fmt, args);
va_end(args);
if (ret == -1) {
return (-1);
=======================================
--- /trunk/src/modules/mod_dir_index/mod_dir_index.c Mon Aug 31 19:45:42
2009
+++ /trunk/src/modules/mod_dir_index/mod_dir_index.c Wed Dec 1 19:09:21
2010
@@ -154,7 +154,7 @@
closedir(dir);
if (filename != NULL) {
- asprintf(&newpath, "%s/%s",
+ cnp_asprintf(&newpath, "%s/%s",
resp->msg_entity->ent_path, filename);
if (newpath == NULL) {
cnp_log(httpd_logchan, CNP_LOG_ERR,
=======================================
--- /trunk/src/sbin/httpd/handlers.c Sun Apr 25 22:31:06 2010
+++ /trunk/src/sbin/httpd/handlers.c Wed Dec 1 19:09:21 2010
@@ -460,7 +460,7 @@
break;
}
- asprintf(&html_resp,
+ cnp_asprintf(&html_resp,
"<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">" \
"<html><head><title>%d %s</title></head><body><h1>%s</h1>" \
"<p>%s</p><hr><i>%s</i></body></html>",