You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2013/10/15 13:19:39 UTC
svn commit: r1532289 - /httpd/httpd/trunk/support/rotatelogs.c
Author: jorton
Date: Tue Oct 15 11:19:38 2013
New Revision: 1532289
URL: http://svn.apache.org/r1532289
Log:
* support/rotatelogs.c (get_now): Fix the NULL ptr dereferences
added in r1532281.
Modified:
httpd/httpd/trunk/support/rotatelogs.c
Modified: httpd/httpd/trunk/support/rotatelogs.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/rotatelogs.c?rev=1532289&r1=1532288&r2=1532289&view=diff
==============================================================================
--- httpd/httpd/trunk/support/rotatelogs.c (original)
+++ httpd/httpd/trunk/support/rotatelogs.c Tue Oct 15 11:19:38 2013
@@ -156,6 +156,7 @@ static void usage(const char *argv0, con
static int get_now(rotate_config_t *config, apr_int32_t *offset)
{
apr_time_t tNow = apr_time_now();
+ int utc_offset;
if (config->use_localtime) {
/* Check for our UTC offset before using it, since it might
@@ -164,13 +165,16 @@ static int get_now(rotate_config_t *conf
*/
apr_time_exp_t lt;
apr_time_exp_lt(<, tNow);
- *offset = lt.tm_gmtoff;
+ utc_offset = lt.tm_gmtoff;
}
else {
- *offset = config->utc_offset;
+ utc_offset = config->utc_offset;
}
- return (int)apr_time_sec(tNow) + *offset;
+ if (offset)
+ *offset = utc_offset;
+
+ return (int)apr_time_sec(tNow) + utc_offset;
}
/*