Browse Source

[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
personal/stbuehler/cleanup-build
Marco Angaroni 4 years ago
committed by Glenn Strauss
parent
commit
3faf042847
  1. 8
      src/mod_webdav.c

8
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;

Loading…
Cancel
Save