Commit 8a23680d authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Dangerous assumption, especially if apr_dir_read uses readdir_r.

Be safe.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@111516 13f79535-47bb-0310-9956-ffa450edef68
parent bb3ed399
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -348,9 +348,7 @@ static int process_dir(char *path, apr_pool_t *pool)
    }

    while (apr_dir_read(&info, 0, dir) == APR_SUCCESS && !interrupted) {
        /* skip first two entries which will always be '.' and '..' */
        if (skip < 2) {
            skip++;
        if (!strcmp(info.name, ".") || !strcmp(info.name, "..")) {
	    continue;
	}
        d = apr_pcalloc(p, sizeof(DIRENTRY));