plugins/xslt: fail early if content_type is null

Fixes null pointer dereference.

Reported by Coverity as CID #1125161
This commit is contained in:
Riccardo Magliocchetti
2013-11-09 15:11:35 +01:00
parent 60f6572985
commit 5ae742e8e1
+4 -4
View File
@@ -399,10 +399,10 @@ static int uwsgi_routing_func_xslt(struct wsgi_request *wsgi_req, struct uwsgi_r
if (!ub_params) goto end;
}
if (urxc->content_type) {
ub_content_type = uwsgi_routing_translate(wsgi_req, ur, *subject, *subject_len, urxc->content_type, urxc->content_type_len);
if (!ub_content_type) goto end;
}
if (!urxc->content_type) goto end;
ub_content_type = uwsgi_routing_translate(wsgi_req, ur, *subject, *subject_len, urxc->content_type, urxc->content_type_len);
if (!ub_content_type) goto end;
int rlen;
xmlDoc *doc = xmlParseFile(ub_doc->buf) ;