From 0fc4f656c7768469d971234ef7fe687a6b9ea1b7 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Wed, 4 Feb 2004 02:16:33 +0000 Subject: fixed segfaul bug with pointer arithmetic in add_server_string_slot Added authors file release 1.94 --- AUTHORS | 2 +- CHANGELOG | 6 ++++-- mod_log_sql.c | 5 ++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/AUTHORS b/AUTHORS index 887bda6..2e62393 100644 --- a/AUTHORS +++ b/AUTHORS @@ -4,7 +4,7 @@ The Apache Foundation Zeev Suraski Adding the mysql routines (intial revisions) -Christopher B. Powell +Christopher B. Powell Maintainer since version 1.06 Edward Rudd diff --git a/CHANGELOG b/CHANGELOG index fbe49b5..d3b0713 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,4 +1,4 @@ -$Id: CHANGELOG,v 1.9 2004/01/22 05:26:56 urkle Exp $ +$Id: CHANGELOG,v 1.10 2004/02/04 02:16:33 urkle Exp $ TODO: * Port connection portion to other DBMS? Genericize the module? Start with @@ -21,9 +21,11 @@ TODO: * rewrite main core logging function to optimize for speed. CHANGES: -1.94: ? +1.94: 2004-02-03 * ssl loggin back in as separate module under 1.3 and 2.0 * preparsing of format tags is now done to speed up main logging loop. +* fixed a nasty bug with pointer arithmetic (ick) that caused a segfault with + LogSQLWhichCookies 1.93: 2004-01-20 * Compiles for apache 1.3 AND 2.0 diff --git a/mod_log_sql.c b/mod_log_sql.c index 68c1e98..f4b8c16 100644 --- a/mod_log_sql.c +++ b/mod_log_sql.c @@ -1,4 +1,4 @@ -/* $Header: /home/cvs/mod_log_sql/mod_log_sql.c,v 1.12 2004/01/22 05:26:56 urkle Exp $ */ +/* $Header: /home/cvs/mod_log_sql/mod_log_sql.c,v 1.13 2004/02/04 02:16:33 urkle Exp $ */ /* --------* * DEFINES * * --------*/ @@ -629,8 +629,7 @@ static const char *add_server_string_slot(cmd_parms *cmd, void *ptr = ap_get_module_config(cmd->server->module_config, &log_sql_module); int offset = (int)(long)cmd->info; - apr_array_header_t *ary = *(apr_array_header_t **)((apr_array_header_t *)ptr + offset); - + apr_array_header_t *ary = *(apr_array_header_t **)(ptr + offset); addme = apr_array_push(ary); *addme = apr_pstrdup(ary->pool, arg); -- cgit