Commit 0693ec6b authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

* Fix potential segfault if flags remains NULL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@693728 13f79535-47bb-0310-9956-ffa450edef68
parent 045d13e1
Loading
Loading
Loading
Loading
+2 −0
Changes for modules/filters/mod_substitute.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -529,6 +529,7 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line)
        return "Bad Substitute format, must be a complete s/// pattern";
    }

    if (flags) {
        while (*flags) {
            delim = apr_tolower(*flags);    /* re-use */
            if (delim == 'i')
@@ -543,6 +544,7 @@ static const char *set_pattern(cmd_parms *cmd, void *cfg, const char *line)
                return "Bad Substitute flag, only s///[infq] are supported";
            flags++;
        }
    }

    /* first see if we can compile the regex */
    if (!is_pattern) {