]>
Commit | Line | Data |
---|---|---|
9d835741 ŁK |
1 | --- lighttpd-1.4.23/src/mod_cgi.c.org 2009-10-09 20:25:41.998318718 +0200 |
2 | +++ lighttpd-1.4.23/src/mod_cgi.c 2009-10-09 20:28:50.680100649 +0200 | |
3 | @@ -732,9 +732,9 @@ | |
4 | ||
5 | #ifndef __WIN32 | |
6 | ||
7 | - if (cgi_handler->used > 1) { | |
8 | + if (cgi_handler->used > 1 && strlen(cgi_handler->ptr+2) > 0) { | |
9 | /* stat the exec file */ | |
10 | - if (-1 == (stat(cgi_handler->ptr, &st))) { | |
11 | + if (-1 == (stat(cgi_handler->ptr+2, &st))) { | |
12 | log_error_write(srv, __FILE__, __LINE__, "sbss", | |
13 | "stat for cgi-handler", cgi_handler, | |
14 | "failed:", strerror(errno)); | |
15 | @@ -1002,8 +1002,8 @@ | |
16 | args = malloc(sizeof(*args) * argc); | |
17 | i = 0; | |
18 | ||
19 | - if (cgi_handler->used > 1) { | |
20 | - args[i++] = cgi_handler->ptr; | |
21 | + if (cgi_handler->used > 1 && strlen(cgi_handler->ptr+2) > 0) { | |
22 | + args[i++] = cgi_handler->ptr+2; | |
23 | } | |
24 | args[i++] = con->physical.path->ptr; | |
25 | args[i ] = NULL; |