public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/openrc:0.35.x commit in: src/rc/
@ 2018-03-02  1:33 William Hubbs
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2018-03-02  1:33 UTC (permalink / raw
  To: gentoo-commits

commit:     05cfbb8348cf92bcc2edd922af1dc0a4c4c2e1f4
Author:     Chris Cromer <cromerc <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Fri Mar  2 00:31:33 2018 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Mar  2 00:33:02 2018 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=05cfbb83

openrc-run: fix memory size (#213)

Fixes #212 

 src/rc/openrc-run.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rc/openrc-run.c b/src/rc/openrc-run.c
index daeafc52..73def8fb 100644
--- a/src/rc/openrc-run.c
+++ b/src/rc/openrc-run.c
@@ -1152,7 +1152,7 @@ int main(int argc, char **argv)
 	}
 	lnk = xmalloc(4096);
 	memset(lnk, 0, 4096);
-	if (readlink(argv[1], lnk, sizeof(lnk)-1)) {
+	if (readlink(argv[1], lnk, 4096)) {
 		dir = dirname(path);
 		if (strchr(lnk, '/')) {
 			save = xstrdup(dir);


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/openrc:0.35.x commit in: src/rc/
@ 2018-03-15  3:03 William Hubbs
  0 siblings, 0 replies; 2+ messages in thread
From: William Hubbs @ 2018-03-15  3:03 UTC (permalink / raw
  To: gentoo-commits

commit:     dc071dfacd23686dd3ae7168c60193618e36f0fa
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Mar 15 01:05:45 2018 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Mar 15 02:26:07 2018 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=dc071dfa

supervise-daemon: fix off-by-one error

 src/rc/supervise-daemon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index 669db3a2..952c610b 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -232,8 +232,8 @@ static char *make_cmdline(char **argv)
 
 	for (c = argv; c && *c; c++)
 		len += (strlen(*c) + 1);
-	cmdline = xmalloc(len);
-	memset(cmdline, 0, len);
+	cmdline = xmalloc(len+1);
+	memset(cmdline, 0, len+1);
 	for (c = argv; c && *c; c++) {
 		strcat(cmdline, *c);
 		strcat(cmdline, " ");


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-03-15  3:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-02  1:33 [gentoo-commits] proj/openrc:0.35.x commit in: src/rc/ William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2018-03-15  3:03 William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox