[Reproducible-commits] [dpkg] 09/32: dpkg-split: Do not corrupt binary part metadata on 32-bit systems

Holger Levsen holger at layer-acht.org
Tue May 3 08:43:13 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to annotated tag 1.15.10
in repository dpkg.

commit 3be9001824ac3eb1b7e2cd6bfee67eb35166dab6
Author: Guillem Jover <guillem at debian.org>
Date:   Fri Apr 15 06:02:34 2011 +0200

    dpkg-split: Do not corrupt binary part metadata on 32-bit systems
    
    On 32-bit systems the format string used to generate the metadata
    archive member of a split package specifies a 32-bit value to be
    retrieved from va_arg, but the variable passed is a 64-bit one, which
    messes with the layout of the stack, producing garbage on output.
    
    Regression introduced in commit f2115151c19ff37b305296c23225807b0832086b.
---
 debian/changelog   | 2 ++
 dpkg-split/split.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index d9d01ca..21371f0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ dpkg (1.15.8.11) UNRELEASED; urgency=low
     Thanks to Robert Millan. Closes: #612203
   * Fix typo in «dpkg-name --overwrite» argument parsing so that it actually
     works at all. Thanks to Ivan Gagis <igagis at gmail.com>. LP: #728708
+  * Fix dpkg-split to not corrupt binary part metadata when generating the
+    split packages on 32-bit systems.
 
   [ Raphaël Hertzog ]
   * Fix a regression in dpkg-divert where using --rename led to a failure when
diff --git a/dpkg-split/split.c b/dpkg-split/split.c
index 46262f1..324c885 100644
--- a/dpkg-split/split.c
+++ b/dpkg-split/split.c
@@ -206,7 +206,7 @@ mksplit(const char *file_src, const char *prefix, size_t partsize,
 		/* Write the debian-split part. */
 		varbufprintf(&partmagic, "%s\n%s\n%s\n%s\n%zu\n%zu\n%d/%d\n",
 		             SPLITVERSION, package, version, hash,
-		             st.st_size, partsize, curpart, nparts);
+		             (size_t)st.st_size, partsize, curpart, nparts);
 		dpkg_ar_member_put_mem(file_dst.buf, fd_dst, PARTMAGIC,
 		                       partmagic.buf, partmagic.used);
 		varbufreset(&partmagic);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list