From ee6e2136c2744219378f91b8d3ea8334a796832b Mon Sep 17 00:00:00 2001 From: Colm MacCarthaigh Date: Tue, 6 Mar 2007 01:54:20 +0000 Subject: [PATCH] Correct a spurious access to whatever memory is at location "1" in the cirumstance where a log line is of the form "nn.nn.nn.nn ". git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@514952 13f79535-47bb-0310-9956-ffa450edef68 --- support/logresolve.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/logresolve.c b/support/logresolve.c index 7d7e647486..8a385e0e46 100644 --- a/support/logresolve.c +++ b/support/logresolve.c @@ -227,7 +227,9 @@ int main(int argc, const char * const argv[]) /* See if we have it in our cache */ hostname = (char *) apr_hash_get(cache, line, APR_HASH_KEY_STRING); if (hostname) { - apr_file_printf(outfile, "%s %s", hostname, space + 1); + apr_file_printf(outfile, hostname); + if (space) + apr_file_printf(outfile, " %s", space + 1); cachehits++; continue; } -- 2.40.0