projects
/
metaproxy-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
539084d
)
bounce: don't use strdup for fixed length content
author
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 5 Sep 2013 12:50:07 +0000
(14:50 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Thu, 5 Sep 2013 12:50:07 +0000
(14:50 +0200)
Error occurred in echo mode.
src/filter_bounce.cpp
patch
|
blob
|
history
diff --git
a/src/filter_bounce.cpp
b/src/filter_bounce.cpp
index
acfdde1
..
c17a53d
100644
(file)
--- a/
src/filter_bounce.cpp
+++ b/
src/filter_bounce.cpp
@@
-69,7
+69,8
@@
static void http_echo(mp::odr &odr, Z_GDU *zgdu, Z_GDU *zgdu_res)
z_HTTP_header_set(odr, &hres->headers,
"Content-Type", "text/plain");
- hres->content_buf = odr_strdup(odr, buf);
+ hres->content_buf = (char*) odr_malloc(odr, len);
+ memcpy(hres->content_buf, buf, len);
hres->content_len = len;
}
odr_destroy(enc);