mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-03 13:28:44 +00:00
Properly trim whitespaces from the hashbang CGI interpreter path
This commit is contained in:
1 parent
531fec34fd
commit
2f3ddeccc5
1 file changed
+1
-1
+1
-1
@@ -1964,7 +1964,7 @@ static process_id_t start_process(char *interp, const char *cmd,
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
if (buf[0] == '#' && buf[1] == '!') {
|
||||
interp = buf + 2;
|
||||
for (p = interp + strlen(interp);
|
||||
for (p = interp + strlen(interp) - 1;
|
||||
isspace(* (uint8_t *) p) && p > interp; p--) *p = '\0';
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
Reference in new issue
Block a user