Commit 4a1f888e authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Fix segfault when trying to log a nameless valueless cookie

PR: 52256
Submitted by: Rainer Canavan <rainer-apache 7val com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1225380 13f79535-47bb-0310-9956-ffa450edef68
parent 120a8c6b
Loading
Loading
Loading
Loading
+2 −0
Changes for modules/loggers/mod_log_config.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -541,6 +541,7 @@ static const char *log_cookie(request_rec *r, char *a)

        while ((cookie = apr_strtok(cookies, ";", &last1))) {
            char *name = apr_strtok(cookie, "=", &last2);
            if (name) {
                char *value;
                apr_collapse_spaces(name, name);

@@ -555,6 +556,7 @@ static const char *log_cookie(request_rec *r, char *a)

                    return ap_escape_logitem(r->pool, value);
                }
            }
            cookies = NULL;
        }
    }