modules/generators/mod_autoindex.c:464: error: BUFFER_OVERRUN_L1
  Offset: 17 Size: 1.

modules/generators/mod_autoindex.c:330:13: <Length trace>
328.         int option = 0;
329. 
330.         w = ap_getword_conf(cmd->pool, &optstr);
                 ^
331.         if ((*w == '+') || (*w == '-')) {
332.             action = *(w++);

modules/generators/mod_autoindex.c:330:13: Call
328.         int option = 0;
329. 
330.         w = ap_getword_conf(cmd->pool, &optstr);
                 ^
331.         if ((*w == '+') || (*w == '-')) {
332.             action = *(w++);

server/util.c:729:9: Array declaration
  727.     if (!*str) {
  728.         *line = str;
  729.         return "";
               ^
  730.     }
  731. 

modules/generators/mod_autoindex.c:330:9: Assignment
328.         int option = 0;
329. 
330.         w = ap_getword_conf(cmd->pool, &optstr);
             ^
331.         if ((*w == '+') || (*w == '-')) {
332.             action = *(w++);

modules/generators/mod_autoindex.c:464:17: Array access: Offset: 17 Size: 1
462.                 return "Cannot combine '-' with DescriptionWidth=n";
463.             }
464.             if (w[17] == '*') {
                     ^
465.                 d_cfg->desc_adjust = K_ADJUST;
466.             }

static const char *add_opts(cmd_parms *cmd, void *d, const char *optstr)
{
    char *w;
    apr_int32_t opts;
    apr_int32_t opts_add;
    apr_int32_t opts_remove;
    char action;
    autoindex_config_rec *d_cfg = (autoindex_config_rec *) d;
    opts = d_cfg->opts;
    opts_add = d_cfg->incremented_opts;
    opts_remove = d_cfg->decremented_opts;
    while (optstr[0]) {
        int option = 0;
        w = ap_getword_conf(cmd->pool, &optstr);
        if ((*w == '+') || (*w == '-')) {
            action = *(w++);
        }
        else {
            action = '\0';
        }
        if (!strcasecmp(w, "FancyIndexing")) {
            option = FANCY_INDEXING;
        }
        else if (!strcasecmp(w, "FoldersFirst")) {
            option = FOLDERS_FIRST;
        }
        else if (!strcasecmp(w, "HTMLTable")) {
            option = TABLE_INDEXING;
        }
        else if (!strcasecmp(w, "IconsAreLinks")) {
            option = ICONS_ARE_LINKS;
        }
        else if (!strcasecmp(w, "IgnoreCase")) {
            option = IGNORE_CASE;
        }
        else if (!strcasecmp(w, "IgnoreClient")) {
            option = IGNORE_CLIENT;
        }
        else if (!strcasecmp(w, "ScanHTMLTitles")) {
            option = SCAN_HTML_TITLES;
        }
        else if (!strcasecmp(w, "SuppressColumnSorting")) {
            option = SUPPRESS_COLSORT;
        }
        else if (!strcasecmp(w, "SuppressDescription")) {
            option = SUPPRESS_DESC;
        }
        else if (!strcasecmp(w, "SuppressHTMLPreamble")) {
            option = SUPPRESS_PREAMBLE;
        }
        else if (!strcasecmp(w, "SuppressIcon")) {
            option = SUPPRESS_ICON;
        }
        else if (!strcasecmp(w, "SuppressLastModified")) {
            option = SUPPRESS_LAST_MOD;
        }
        else if (!strcasecmp(w, "SuppressSize")) {
            option = SUPPRESS_SIZE;
        }
        else if (!strcasecmp(w, "SuppressRules")) {
            option = SUPPRESS_RULES;
        }
        else if (!strcasecmp(w, "TrackModified")) {
            option = TRACK_MODIFIED;
        }
        else if (!strcasecmp(w, "VersionSort")) {
            option = VERSION_SORT;
        }
        else if (!strcasecmp(w, "XHTML")) {
            option = EMIT_XHTML;
        }
        else if (!strcasecmp(w, "ShowForbidden")) {
            option = SHOW_FORBIDDEN;
        }
        else if (!strcasecmp(w, "None")) {
            if (action != '\0') {
                return "Cannot combine '+' or '-' with 'None' keyword";
            }
            opts = NO_OPTIONS;
            opts_add = 0;
            opts_remove = 0;
        }
        else if (!strcasecmp(w, "IconWidth")) {
            if (action != '-') {
                d_cfg->icon_width = DEFAULT_ICON_WIDTH;
            }
            else {
                d_cfg->icon_width = 0;
            }
        }
        else if (!strncasecmp(w, "IconWidth=", 10)) {
            if (action == '-') {
                return "Cannot combine '-' with IconWidth=n";
            }
            d_cfg->icon_width = atoi(&w[10]);
        }
        else if (!strcasecmp(w, "IconHeight")) {
            if (action != '-') {
                d_cfg->icon_height = DEFAULT_ICON_HEIGHT;
            }
            else {
                d_cfg->icon_height = 0;
            }
        }
        else if (!strncasecmp(w, "IconHeight=", 11)) {
            if (action == '-') {
                return "Cannot combine '-' with IconHeight=n";
            }
            d_cfg->icon_height = atoi(&w[11]);
        }
        else if (!strcasecmp(w, "NameWidth")) {
            if (action != '-') {
                return "NameWidth with no value may only appear as "
                       "'-NameWidth'";
            }
            d_cfg->name_width = DEFAULT_NAME_WIDTH;
            d_cfg->name_adjust = K_NOADJUST;
        }
        else if (!strncasecmp(w, "NameWidth=", 10)) {
            if (action == '-') {
                return "Cannot combine '-' with NameWidth=n";
            }
            if (w[10] == '*') {
                d_cfg->name_adjust = K_ADJUST;
            }
            else {
                int width = atoi(&w[10]);
                if (width && (width < 5)) {
                    return "NameWidth value must be greater than 5";
                }
                d_cfg->name_width = width;
                d_cfg->name_adjust = K_NOADJUST;
            }
        }
        else if (!strcasecmp(w, "DescriptionWidth")) {
            if (action != '-') {
                return "DescriptionWidth with no value may only appear as "
                       "'-DescriptionWidth'";
            }
            d_cfg->desc_width = DEFAULT_DESC_WIDTH;
            d_cfg->desc_adjust = K_NOADJUST;
        }
        else if (!strncasecmp(w, "DescriptionWidth=", 17)) {
            if (action == '-') {
                return "Cannot combine '-' with DescriptionWidth=n";
            }
            if (w[17] == '*') {
                d_cfg->desc_adjust = K_ADJUST;
            }
            else {
                int width = atoi(&w[17]);
                if (width && (width < 12)) {
                    return "DescriptionWidth value must be greater than 12";
                }
                d_cfg->desc_width = width;
                d_cfg->desc_adjust = K_NOADJUST;
            }
        }
        else {
            return "Invalid directory indexing option";
        }
        if (action == '\0') {
            opts |= option;
            opts_add = 0;
            opts_remove = 0;
        }
        else if (action == '+') {
            opts_add |= option;
            opts_remove &= ~option;
        }
        else {
            opts_remove |= option;
            opts_add &= ~option;
        }
    }
    if ((opts & NO_OPTIONS) && (opts & ~NO_OPTIONS)) {
        return "Cannot combine other IndexOptions keywords with 'None'";
    }
    d_cfg->incremented_opts = opts_add;
    d_cfg->decremented_opts = opts_remove;
    d_cfg->opts = opts;
    return NULL;
}
['static const char *add_opts(cmd_parms *cmd, void *d, const char *optstr)\n{\n    char *w;\n    apr_int32_t opts;\n    apr_int32_t opts_add;\n    apr_int32_t opts_remove;\n    char action;\n    autoindex_config_rec *d_cfg = (autoindex_config_rec *) d;\n    opts = d_cfg->opts;\n    opts_add = d_cfg->incremented_opts;\n    opts_remove = d_cfg->decremented_opts;\n    while (optstr[0]) {\n        int option = 0;\n        w = ap_getword_conf(cmd->pool, &optstr);\n        if ((*w == \'+\') || (*w == \'-\')) {\n            action = *(w++);\n        }\n        else {\n            action = \'\\0\';\n        }\n        if (!strcasecmp(w, "FancyIndexing")) {\n            option = FANCY_INDEXING;\n        }\n        else if (!strcasecmp(w, "FoldersFirst")) {\n            option = FOLDERS_FIRST;\n        }\n        else if (!strcasecmp(w, "HTMLTable")) {\n            option = TABLE_INDEXING;\n        }\n        else if (!strcasecmp(w, "IconsAreLinks")) {\n            option = ICONS_ARE_LINKS;\n        }\n        else if (!strcasecmp(w, "IgnoreCase")) {\n            option = IGNORE_CASE;\n        }\n        else if (!strcasecmp(w, "IgnoreClient")) {\n            option = IGNORE_CLIENT;\n        }\n        else if (!strcasecmp(w, "ScanHTMLTitles")) {\n            option = SCAN_HTML_TITLES;\n        }\n        else if (!strcasecmp(w, "SuppressColumnSorting")) {\n            option = SUPPRESS_COLSORT;\n        }\n        else if (!strcasecmp(w, "SuppressDescription")) {\n            option = SUPPRESS_DESC;\n        }\n        else if (!strcasecmp(w, "SuppressHTMLPreamble")) {\n            option = SUPPRESS_PREAMBLE;\n        }\n        else if (!strcasecmp(w, "SuppressIcon")) {\n            option = SUPPRESS_ICON;\n        }\n        else if (!strcasecmp(w, "SuppressLastModified")) {\n            option = SUPPRESS_LAST_MOD;\n        }\n        else if (!strcasecmp(w, "SuppressSize")) {\n            option = SUPPRESS_SIZE;\n        }\n        else if (!strcasecmp(w, "SuppressRules")) {\n            option = SUPPRESS_RULES;\n        }\n        else if (!strcasecmp(w, "TrackModified")) {\n            option = TRACK_MODIFIED;\n        }\n        else if (!strcasecmp(w, "VersionSort")) {\n            option = VERSION_SORT;\n        }\n        else if (!strcasecmp(w, "XHTML")) {\n            option = EMIT_XHTML;\n        }\n        else if (!strcasecmp(w, "ShowForbidden")) {\n            option = SHOW_FORBIDDEN;\n        }\n        else if (!strcasecmp(w, "None")) {\n            if (action != \'\\0\') {\n                return "Cannot combine \'+\' or \'-\' with \'None\' keyword";\n            }\n            opts = NO_OPTIONS;\n            opts_add = 0;\n            opts_remove = 0;\n        }\n        else if (!strcasecmp(w, "IconWidth")) {\n            if (action != \'-\') {\n                d_cfg->icon_width = DEFAULT_ICON_WIDTH;\n            }\n            else {\n                d_cfg->icon_width = 0;\n            }\n        }\n        else if (!strncasecmp(w, "IconWidth=", 10)) {\n            if (action == \'-\') {\n                return "Cannot combine \'-\' with IconWidth=n";\n            }\n            d_cfg->icon_width = atoi(&w[10]);\n        }\n        else if (!strcasecmp(w, "IconHeight")) {\n            if (action != \'-\') {\n                d_cfg->icon_height = DEFAULT_ICON_HEIGHT;\n            }\n            else {\n                d_cfg->icon_height = 0;\n            }\n        }\n        else if (!strncasecmp(w, "IconHeight=", 11)) {\n            if (action == \'-\') {\n                return "Cannot combine \'-\' with IconHeight=n";\n            }\n            d_cfg->icon_height = atoi(&w[11]);\n        }\n        else if (!strcasecmp(w, "NameWidth")) {\n            if (action != \'-\') {\n                return "NameWidth with no value may only appear as "\n                       "\'-NameWidth\'";\n            }\n            d_cfg->name_width = DEFAULT_NAME_WIDTH;\n            d_cfg->name_adjust = K_NOADJUST;\n        }\n        else if (!strncasecmp(w, "NameWidth=", 10)) {\n            if (action == \'-\') {\n                return "Cannot combine \'-\' with NameWidth=n";\n            }\n            if (w[10] == \'*\') {\n                d_cfg->name_adjust = K_ADJUST;\n            }\n            else {\n                int width = atoi(&w[10]);\n                if (width && (width < 5)) {\n                    return "NameWidth value must be greater than 5";\n                }\n                d_cfg->name_width = width;\n                d_cfg->name_adjust = K_NOADJUST;\n            }\n        }\n        else if (!strcasecmp(w, "DescriptionWidth")) {\n            if (action != \'-\') {\n                return "DescriptionWidth with no value may only appear as "\n                       "\'-DescriptionWidth\'";\n            }\n            d_cfg->desc_width = DEFAULT_DESC_WIDTH;\n            d_cfg->desc_adjust = K_NOADJUST;\n        }\n        else if (!strncasecmp(w, "DescriptionWidth=", 17)) {\n            if (action == \'-\') {\n                return "Cannot combine \'-\' with DescriptionWidth=n";\n            }\n            if (w[17] == \'*\') {\n                d_cfg->desc_adjust = K_ADJUST;\n            }\n            else {\n                int width = atoi(&w[17]);\n                if (width && (width < 12)) {\n                    return "DescriptionWidth value must be greater than 12";\n                }\n                d_cfg->desc_width = width;\n                d_cfg->desc_adjust = K_NOADJUST;\n            }\n        }\n        else {\n            return "Invalid directory indexing option";\n        }\n        if (action == \'\\0\') {\n            opts |= option;\n            opts_add = 0;\n            opts_remove = 0;\n        }\n        else if (action == \'+\') {\n            opts_add |= option;\n            opts_remove &= ~option;\n        }\n        else {\n            opts_remove |= option;\n            opts_add &= ~option;\n        }\n    }\n    if ((opts & NO_OPTIONS) && (opts & ~NO_OPTIONS)) {\n        return "Cannot combine other IndexOptions keywords with \'None\'";\n    }\n    d_cfg->incremented_opts = opts_add;\n    d_cfg->decremented_opts = opts_remove;\n    d_cfg->opts = opts;\n    return NULL;\n}', 'AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)\n{\n    const char *str = *line, *strend;\n    char *res;\n    char quote;\n    while (*str && apr_isspace(*str))\n        ++str;\n    if (!*str) {\n        *line = str;\n        return "";\n    }\n    if ((quote = *str) == \'"\' || quote == \'\\\'\') {\n        strend = str + 1;\n        while (*strend && *strend != quote) {\n            if (*strend == \'\\\\\' && strend[1] && strend[1] == quote)\n                strend += 2;\n            else\n                ++strend;\n        }\n        res = substring_conf(p, str + 1, strend - str - 1, quote);\n        if (*strend == quote)\n            ++strend;\n    }\n    else {\n        strend = str;\n        while (*strend && !apr_isspace(*strend))\n            ++strend;\n        res = substring_conf(p, str, strend - str, 0);\n    }\n    while (*strend && apr_isspace(*strend))\n        ++strend;\n    *line = strend;\n    return res;\n}']