Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8048CF60A for ; Sun, 14 Apr 2013 11:17:06 +0000 (UTC) Received: (qmail 16996 invoked by uid 500); 14 Apr 2013 11:17:05 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 16792 invoked by uid 500); 14 Apr 2013 11:17:05 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 16761 invoked by uid 99); 14 Apr 2013 11:17:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Apr 2013 11:17:04 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 14 Apr 2013 11:17:02 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5AB8B23888CD; Sun, 14 Apr 2013 11:16:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1467765 - /httpd/httpd/trunk/modules/loggers/mod_log_config.c Date: Sun, 14 Apr 2013 11:16:41 -0000 To: cvs@httpd.apache.org From: rjung@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130414111641.5AB8B23888CD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rjung Date: Sun Apr 14 11:16:40 2013 New Revision: 1467765 URL: http://svn.apache.org/r1467765 Log: Fix crash in mod_log_config when logging request end time for a failed request (LogFormat contains %{end}t). The request_config for mod_log_config might not be initialized. PR 54828. Modified: httpd/httpd/trunk/modules/loggers/mod_log_config.c Modified: httpd/httpd/trunk/modules/loggers/mod_log_config.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/loggers/mod_log_config.c?rev=1467765&r1=1467764&r2=1467765&view=diff ============================================================================== --- httpd/httpd/trunk/modules/loggers/mod_log_config.c (original) +++ httpd/httpd/trunk/modules/loggers/mod_log_config.c Sun Apr 14 11:16:40 2013 @@ -597,6 +597,10 @@ static apr_time_t get_request_end_time(r { log_request_state *state = (log_request_state *)ap_get_module_config(r->request_config, &log_config_module); + if (!state) { + state = apr_pcalloc(r->pool, sizeof(log_request_state)); + ap_set_module_config(r->request_config, &log_config_module, state); + } if (state->request_end_time == 0) { state->request_end_time = apr_time_now(); }