commit: e36e9a30eb830ea27b467383fa2ae02cd2b0d9d4 Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com> AuthorDate: Thu Jun 28 21:08:57 2018 +0000 Commit: William Hubbs <williamh <AT> gentoo <DOT> org> CommitDate: Fri Jun 29 14:07:47 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=e36e9a30
rc-status: initialize uptime pointer to prevent memory corruption This fixes #231. src/rc/rc-status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c index 85e71dbb..cebdc5ed 100644 --- a/src/rc/rc-status.c +++ b/src/rc/rc-status.c @@ -87,7 +87,7 @@ static char *get_uptime(const char *service) time_t diff_hours = (time_t) 0; time_t diff_mins = (time_t) 0; time_t diff_secs = (time_t) 0; - char *uptime; + char *uptime = NULL; if (state & RC_SERVICE_STARTED) { start_count = rc_service_value_get(service, "start_count");