Commit d479dbbd authored by Jim Jagielski's avatar Jim Jagielski
Browse files

Close PR 50861 where enabling and disabling of buffered

logs can cause a segfault. Patch by: Torsten Förtsch <torsten.foertsch@gmx.net>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1082518 13f79535-47bb-0310-9956-ffa450edef68
parent 2656af1b
Loading
Loading
Loading
Loading
+3 −0
Changes for CHANGES: 3 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@

Changes with Apache 2.3.12

  *) mod_log_config: Prevent segfault. PR 50861. [Torsten Förtsch
     <torsten.foertsch gmx.net>]

  *) core: AllowEncodedSlashes new option NoDecode to allow encoded slashes
     in request URL path info but not decode them. Change behavior of option
     "On" to decode the encoded slashes as 2.0 and 2.2 do.  PR 35256,
+9 −0
Changes for modules/loggers/mod_log_config.c: 9 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1295,6 +1295,10 @@ static const char *set_buffered_logs_on(cmd_parms *parms, void *dummy, int flag)
        ap_log_set_writer_init(ap_buffered_log_writer_init);
        ap_log_set_writer(ap_buffered_log_writer);
    }
    else {
        ap_log_set_writer_init(ap_default_log_writer_init);
        ap_log_set_writer(ap_default_log_writer);
    }
    return NULL;
}
static const command_rec config_log_cmds[] =
@@ -1668,6 +1672,11 @@ static int log_pre_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp)
        log_pfn_register(p, "R", log_handler, 1);
    }

    /* reset to default conditions */
    ap_log_set_writer_init(ap_default_log_writer_init);
    ap_log_set_writer(ap_default_log_writer);
    buffered_logs = 0;

    return OK;
}