1 |
commit: 2d3465b19eafb2577974cb9fa48a3938cdb38925 |
2 |
Author: Joakim Tjernlund <joakim.tjernlund <AT> infinera <DOT> com> |
3 |
AuthorDate: Wed Jun 16 14:53:00 2021 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 16 19:19:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=2d3465b1 |
7 |
|
8 |
qmerge: Protect against another NULL hash |
9 |
|
10 |
Signed-off-by: Joakim Tjernlund <joakim.tjernlund <AT> infinera.com> |
11 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
12 |
|
13 |
qmerge.c | 2 +- |
14 |
1 file changed, 1 insertion(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/qmerge.c b/qmerge.c |
17 |
index 583a27e..43f537a 100644 |
18 |
--- a/qmerge.c |
19 |
+++ b/qmerge.c |
20 |
@@ -804,7 +804,7 @@ merge_tree_at(int fd_src, const char *src, int fd_dst, const char *dst, |
21 |
hash = hash_file_at(subfd_src, name, HASH_MD5); |
22 |
if (!pretend) |
23 |
fprintf(contents, "obj %s %s %zu""\n", |
24 |
- cpath, hash, (size_t)st.st_mtime); |
25 |
+ cpath, hash ? hash : "xxx", (size_t)st.st_mtime); |
26 |
|
27 |
/* Check CONFIG_PROTECT */ |
28 |
if (config_protected(cpath + eprefix_len, |