diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-10-20 10:22:14 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-10-20 10:22:14 +0100 |
commit | 46eedbedafdb0040c37884982d4c775ce277fb7b (patch) | |
tree | db33a91259730be84999e13a8d8168c799f50ac0 /sys-apps/openrc/files | |
parent | e23a08d0c97a0cc415aaa165da840b056f93c997 (diff) |
gentoo resync : 20.10.2021
Diffstat (limited to 'sys-apps/openrc/files')
-rw-r--r-- | sys-apps/openrc/files/openrc-0.44.6-fix-checkpath.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/sys-apps/openrc/files/openrc-0.44.6-fix-checkpath.patch b/sys-apps/openrc/files/openrc-0.44.6-fix-checkpath.patch new file mode 100644 index 000000000000..e1ef97d981dc --- /dev/null +++ b/sys-apps/openrc/files/openrc-0.44.6-fix-checkpath.patch @@ -0,0 +1,33 @@ +From cc45b55f895d0c21b5ac3e5a65b0bf00f76adeb7 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 8 Oct 2021 04:52:55 +0100 +Subject: [PATCH 1/2] checkpath: fix allocation size of path buffer + +strlen's return value isn't enough to be used +directly for (x)malloc; it doesn't include +the null byte at the end of the string. + +X-Gentoo-Bug: 816900 +X-Gentoo-Bug-URL: https://bugs.gentoo.org/816900 +Fixes: #459 +Fixes: #462 +--- + src/rc/checkpath.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c +index bab22692..c4dd7d9d 100644 +--- a/src/rc/checkpath.c ++++ b/src/rc/checkpath.c +@@ -151,7 +151,7 @@ static char *clean_path(char *path) + char *ch; + char *ch2; + char *str; +- str = xmalloc(strlen(path)); ++ str = xmalloc(strlen(path) + 1); + ch = path; + ch2 = str; + while (true) { +-- +2.32.0 + |