Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
Date: Fri, 29 Jun 2018 20:32:42
Message-Id: 1530280153.79648ac1c6355975abca6acf6076e7022037523f.williamh@OpenRC
1 commit: 79648ac1c6355975abca6acf6076e7022037523f
2 Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
3 AuthorDate: Thu Jun 28 21:08:57 2018 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 29 13:49:13 2018 +0000
6 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=79648ac1
7
8 rc-status: initialize uptime pointer to prevent memory corruption
9
10 This fixes #231.
11
12 src/rc/rc-status.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15 diff --git a/src/rc/rc-status.c b/src/rc/rc-status.c
16 index 85e71dbb..cebdc5ed 100644
17 --- a/src/rc/rc-status.c
18 +++ b/src/rc/rc-status.c
19 @@ -87,7 +87,7 @@ static char *get_uptime(const char *service)
20 time_t diff_hours = (time_t) 0;
21 time_t diff_mins = (time_t) 0;
22 time_t diff_secs = (time_t) 0;
23 - char *uptime;
24 + char *uptime = NULL;
25
26 if (state & RC_SERVICE_STARTED) {
27 start_count = rc_service_value_get(service, "start_count");