From e9726b1e753b8637bdfad4dea964642f520f6435 Mon Sep 17 00:00:00 2001 From: "roberto@maverick64" Date: Sun, 3 Jul 2011 12:59:58 +0200 Subject: [PATCH] fixed ticket #28 --- uwsgi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/uwsgi.c b/uwsgi.c index 3eb85f18..6abbced9 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -2724,6 +2724,10 @@ static int manage_base_opt(int i, char *optarg) { return 1; case LONG_ARGS_CHECK_STATIC: uwsgi.check_static = realpath(optarg, NULL); + if (!uwsgi.check_static) { + uwsgi_error("check-static realpath()"); + exit(1); + } uwsgi.check_static_len = strlen(uwsgi.check_static); return 1; case LONG_ARGS_FILE_SERVE_MODE: @@ -2850,6 +2854,10 @@ static int manage_base_opt(int i, char *optarg) { usm->mountpoint_len = docroot - usm->mountpoint; usm->document_root = realpath(docroot + 1, NULL); + if (!usm->document_root) { + uwsgi_error("static-map realpath()"); + exit(1); + } usm->document_root_len = strlen(usm->document_root); usm->orig_document_root = usm->document_root;