[pacman-dev] [PATCH] fix duplication of package sha256sum

Allan McRae allan at archlinux.org
Wed Dec 24 02:37:47 UTC 2014


Signed-off-by: Allan McRae <allan at archlinux.org>
---

I can only think we have not seen an error due to this because signatures
overrule all checksums.

 lib/libalpm/package.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index ce6b0a2..b186a4c 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -584,7 +584,7 @@ int _alpm_pkg_dup(alpm_pkg_t *pkg, alpm_pkg_t **new_ptr)
 	newpkg->installdate = pkg->installdate;
 	STRDUP(newpkg->packager, pkg->packager, goto cleanup);
 	STRDUP(newpkg->md5sum, pkg->md5sum, goto cleanup);
-	STRDUP(newpkg->sha256sum, pkg->md5sum, goto cleanup);
+	STRDUP(newpkg->sha256sum, pkg->sha256sum, goto cleanup);
 	STRDUP(newpkg->arch, pkg->arch, goto cleanup);
 	newpkg->size = pkg->size;
 	newpkg->isize = pkg->isize;
-- 
2.2.1


More information about the pacman-dev mailing list