summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-27 17:45:19 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-28 10:04:48 +0200
commitce99f9e73438ac8a62347f628f7c5d25941023da (patch)
tree11255d976d4eb79aed372464379b989ec14a2d54
parentfe2a6076402ec26091eb0c543447e0ae09f39f75 (diff)
downloadsamba-ce99f9e73438ac8a62347f628f7c5d25941023da.tar.gz
samba-ce99f9e73438ac8a62347f628f7c5d25941023da.tar.bz2
samba-ce99f9e73438ac8a62347f628f7c5d25941023da.zip
s4:web_server/wsgi.c - fix "asprintf" call
-rw-r--r--source4/web_server/wsgi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/web_server/wsgi.c b/source4/web_server/wsgi.c
index 7ee70e1107..7a23ae4658 100644
--- a/source4/web_server/wsgi.c
+++ b/source4/web_server/wsgi.c
@@ -300,7 +300,9 @@ static PyObject *create_environ(bool tls, int content_length, struct http_header
if (!strcasecmp(hdr->name, "Content-Type")) {
PyDict_SetItemString(env, "CONTENT_TYPE", PyString_FromString(hdr->value));
} else {
- asprintf(&name, "HTTP_%s", hdr->name);
+ if (asprintf(&name, "HTTP_%s", hdr->name) < 0) {
+ continue;
+ }
PyDict_SetItemString(env, name, PyString_FromString(hdr->value));
free(name);
}