View | Details | Raw Unified | Return to bug 51194
Collapse All | Expand All

(-)modules/fcgid/fcgid_conf.c (-3 / +5 lines)
Lines 831-841 Link Here
831
                               const char *extension,
831
                               const char *extension,
832
                               const char *virtual)
832
                               const char *virtual)
833
{
833
{
834
    const char *path, *tmp;
834
    const char *path;
835
    apr_status_t rv;
835
    apr_status_t rv;
836
    apr_finfo_t finfo;
836
    apr_finfo_t finfo;
837
    fcgid_cmd_conf *wrapper = NULL;
837
    fcgid_cmd_conf *wrapper = NULL;
838
    fcgid_dir_conf *config = (fcgid_dir_conf *) dirconfig;
838
    fcgid_dir_conf *config = (fcgid_dir_conf *) dirconfig;
839
    char **args;
839
840
840
    /* Sanity checks */
841
    /* Sanity checks */
841
842
Lines 854-861 Link Here
854
        return "Invalid wrapper file extension";
855
        return "Invalid wrapper file extension";
855
856
856
    /* Get wrapper path */
857
    /* Get wrapper path */
857
    tmp = wrapper_cmdline;
858
    apr_tokenize_to_argv(wrapper_cmdline, &args, cmd->temp_pool);
858
    path = ap_getword_white(cmd->temp_pool, &tmp);
859
    path = apr_pstrdup(cmd->pool, args[0]);
860
859
    if (path == NULL || *path == '\0')
861
    if (path == NULL || *path == '\0')
860
        return "Invalid wrapper config";
862
        return "Invalid wrapper config";
861
863
(-)modules/fcgid/fcgid_proc_unix.c (-15 / +3 lines)
Lines 204-226 Link Here
204
    char **proc_environ;
204
    char **proc_environ;
205
    struct sockaddr_un unix_addr;
205
    struct sockaddr_un unix_addr;
206
    apr_procattr_t *procattr = NULL;
206
    apr_procattr_t *procattr = NULL;
207
    int argc, len;
207
    int len;
208
    const char *wargv[APACHE_ARG_MAX + 1];
208
    const char **wargv;
209
    const char *word; /* For wrapper */
210
    const char *tmp;
211
209
212
    /* Build wrapper args */
210
    /* Build wrapper args */
213
    argc = 0;
211
    apr_tokenize_to_argv(cmdline, (char ***)&wargv, procnode->proc_pool);
214
    tmp = cmdline;
215
    while (1) {
216
        word = ap_getword_white(procnode->proc_pool, &tmp);
217
        if (word == NULL || *word == '\0')
218
            break;
219
        if (argc >= APACHE_ARG_MAX)
220
            break;
221
        wargv[argc++] = word;
222
    }
223
    wargv[argc] = NULL;
224
212
225
    /*
213
    /*
226
       Create UNIX domain socket before spawn
214
       Create UNIX domain socket before spawn
(-)modules/fcgid/fcgid_proc_win.c (-14 / +2 lines)
Lines 69-90 Link Here
69
    apr_file_t *file;
69
    apr_file_t *file;
70
    const char * const *proc_environ;
70
    const char * const *proc_environ;
71
    char sock_path[FCGID_PATH_MAX];
71
    char sock_path[FCGID_PATH_MAX];
72
    int argc;
72
    const char **wargv;
73
    char const * wargv[APACHE_ARG_MAX + 1], *word; /* For wrapper */
74
    const char *tmp;
75
73
76
    /* Build wrapper args */
74
    /* Build wrapper args */
77
    argc = 0;
75
    apr_tokenize_to_argv(cmdline, (char ***)&wargv, procnode->proc_pool);
78
    tmp = cmdline;
79
    while (1) {
80
        word = ap_getword_white(procnode->proc_pool, &tmp);
81
        if (word == NULL || *word == '\0')
82
            break;
83
        if (argc >= APACHE_ARG_MAX)
84
            break;
85
        wargv[argc++] = word;
86
    }
87
    wargv[argc] = NULL;
88
76
89
    memset(&SecurityAttributes, 0, sizeof(SecurityAttributes));
77
    memset(&SecurityAttributes, 0, sizeof(SecurityAttributes));
90
78

Return to bug 51194