Index: main/config.c =================================================================== --- main/config.c (revision 209049) +++ main/config.c (working copy) @@ -717,16 +717,24 @@ } if (do_include || do_exec) { if (c) { + cur = c; /* Strip off leading and trailing "'s and <>'s */ - while((*c == '<') || (*c == '>') || (*c == '\"')) c++; - /* Get rid of leading mess */ - cur = c; - while (!ast_strlen_zero(cur)) { - c = cur + strlen(cur) - 1; - if ((*c == '>') || (*c == '<') || (*c == '\"')) - *c = '\0'; - else - break; + if (*c == '"') { + /* Dequote */ + while (*c) { + if (*c == '"') { + strcpy(c, c + 1); /* SAFE */ + c--; + } else if (*c == '\\') { + strcpy(c, c + 1); /* SAFE */ + } + c++; + } + } else if (*c == '<') { + /* C-style include */ + if (*(c + strlen(c) - 1) == '>') { + *(c + strlen(c) - 1) = '\0'; + } } /* #exec We create a tmp file, then we #include it, then we delete it. */