Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage-utils:master commit in: libq/
Date: Sun, 06 Feb 2022 13:27:29
Message-Id: 1644154042.0541387d790d9e9c0e0033492bdbdb5c6d6d2f59.grobian@gentoo
1 commit: 0541387d790d9e9c0e0033492bdbdb5c6d6d2f59
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 6 13:27:22 2022 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 6 13:27:22 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=0541387d
7
8 libq/tree: allocate enough space in tree_clone_meta
9
10 Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>
11
12 libq/tree.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15 diff --git a/libq/tree.c b/libq/tree.c
16 index db0d2d2..7285cd7 100644
17 --- a/libq/tree.c
18 +++ b/libq/tree.c
19 @@ -1135,7 +1135,7 @@ tree_clone_meta(tree_pkg_meta *m)
20 len = sizeof(*ret);
21 for (ptr = &m->Q__data; ptr <= &m->Q__last; ptr++)
22 if (*ptr != NULL)
23 - len += strlen(*ptr);
24 + len += strlen(*ptr) + 1;
25
26 /* malloc and copy */
27 ret = xzalloc(len);