| Index: third_party/mongoose/mongoose.c
|
| diff --git a/third_party/mongoose/mongoose.c b/third_party/mongoose/mongoose.c
|
| index bdf7061841674d8f74d53b5f59a8374045135ee0..67ec9bd3a7ad4024db9b10b3e1f8f5adad664ee1 100644
|
| --- a/third_party/mongoose/mongoose.c
|
| +++ b/third_party/mongoose/mongoose.c
|
| @@ -2820,6 +2820,8 @@ static void prepare_cgi_environment(struct mg_connection *conn,
|
| blk->len = blk->nvars = 0;
|
| blk->conn = conn;
|
|
|
| + memset(&root, 0, sizeof(root));
|
| +
|
| get_document_root(conn, &root);
|
|
|
| addenv(blk, "SERVER_NAME=%s", conn->ctx->config[AUTHENTICATION_DOMAIN]);
|
| @@ -2916,6 +2918,8 @@ static void handle_cgi_request(struct mg_connection *conn, const char *prog) {
|
| FILE *in, *out;
|
| pid_t pid;
|
|
|
| + memset(&ri, 0, sizeof(ri));
|
| +
|
| prepare_cgi_environment(conn, prog, &blk);
|
|
|
| // CGI must be executed in its own directory. 'dir' must point to the
|
|
|