commit: 79648ac1c6355975abca6acf6076e7022037523f 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 13:49:13 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=79648ac1
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");