diff options
author | Marco Angaroni <marco.angaroni@italtel.com> | 2017-10-24 15:50:58 +0200 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2017-10-25 21:21:04 -0400 |
commit | 3faf04284729e0653f8994b018d651b10da524a3 (patch) | |
tree | 7bb707940f8cd2cd54265be7bf7f304350b5a2a5 | |
parent | 6a17133a75754118960eabaf21d1d078f0face8c (diff) | |
download | lighttpd-git-3faf04284729e0653f8994b018d651b10da524a3.tar.gz |
[mod_webdav] fix crash if stat fails, not ENOENT
fix crash in mod_webdav_subrequest_handler_huge()
when stat_cache_get_entry() returns HANDLER_ERROR
but errno is not ENOENT
x-ref:
"fix crash in mod_webdav_subrequest_handler_huge()"
https://github.com/lighttpd/lighttpd1.4/pull/86
github: closes #86
-rw-r--r-- | src/mod_webdav.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mod_webdav.c b/src/mod_webdav.c index 58e3df38..e5799aa5 100644 --- a/src/mod_webdav.c +++ b/src/mod_webdav.c @@ -1339,6 +1339,14 @@ SUBREQUEST_FUNC(mod_webdav_subrequest_handler_huge) { con->http_status = 404; return HANDLER_FINISHED; } + else if (errno == EACCES) { + con->http_status = 403; + return HANDLER_FINISHED; + } + else { + con->http_status = 500; + return HANDLER_FINISHED; + } break; default: break; |