Bug 62347 - wrong error assignmemt
Summary: wrong error assignmemt
Status: RESOLVED INVALID
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_dav_fs (show other bugs)
Version: 2.4.29
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-03 02:50 UTC by scu.bjwu
Modified: 2018-11-03 07:21 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description scu.bjwu 2018-05-03 02:50:41 UTC
In function dav_fs_get_parent_resource(), all the return values are NULL.
However, it seems like this if-condition below indicates an error path:

if ((tv != APR_SUCESS && rv != APR_ERELATIVE) || !testpath || !*testpah) {
    *result_parent = NULL;
    return NULL;
}

Should we return some value (dav_error) to indicate this situation?

Thanks.
Comment 1 Christophe JAILLET 2018-05-26 21:25:05 UTC
The comment before this test is:
> /* If given resource is root, then there is no parent.
>  * Unless we can retrieve the filepath root, this is
>  * intendend to fail.  If we split the root and
>  * no path info remains, then we also fail.
>  */

I don't know this part of the code well enough, but the comment looks in line with the code.

Why do you think an error should be returned? Can you elaborate?
Comment 2 Christophe JAILLET 2018-11-03 07:21:07 UTC
Closed because of lack of activity on this report.
There is no evidence of a bug here.

Feel free to re-open if needed.