mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
web_server/wsgi: Don't segfault when wsgi app doesn't return iterable.
There is a bug in the application if this happens, but invalid Python code shouldn't cause segfaults. Reviewed-by: Matthieu Patou <mat@matws.net>
This commit is contained in:
parent
f22e15d9d5
commit
31f0e24fbe
@ -369,6 +369,11 @@ static void wsgi_process_http_input(struct web_server_data *wdata,
|
||||
iter = PyObject_GetIter(result);
|
||||
Py_DECREF(result);
|
||||
|
||||
if (iter == NULL) {
|
||||
DEBUG(0, ("wsgi application did not return iterable\n"));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Now, iter over all the data returned */
|
||||
|
||||
while ((item = PyIter_Next(iter))) {
|
||||
|
Loading…
Reference in New Issue
Block a user