Sun, 01 May 2022 11:07:31 +0200
fix uninitialized memory access in directory check
src/server/webdav/webdav.c | file | annotate | diff | comparison | revisions |
--- a/src/server/webdav/webdav.c Sun May 01 11:03:29 2022 +0200 +++ b/src/server/webdav/webdav.c Sun May 01 11:07:31 2022 +0200 @@ -667,9 +667,7 @@ protocol_status(sn, rq, util_errno2status(vfs->vfs_errno), NULL); return REQ_ABORTED; } - } - - if(S_ISDIR(s.st_mode)) { + } else if(S_ISDIR(s.st_mode)) { // PUT on collections is not allowed protocol_status(sn, rq, PROTOCOL_METHOD_NOT_ALLOWED, NULL); return REQ_ABORTED;