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