This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=4d12a2ebbc861398b43b069667497fdfec112100 commit 4d12a2ebbc861398b43b069667497fdfec112100 Author: Guillem Jover <[email protected]> AuthorDate: Sat Dec 21 06:10:34 2024 +0100 Dpkg::Archive::Ar: Copy only the number of bytes we have read When copying from filehandle to filehandle, we should only write the amount of bytes we have read in the previous call. --- scripts/Dpkg/Archive/Ar.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Dpkg/Archive/Ar.pm b/scripts/Dpkg/Archive/Ar.pm index c98ede4d5..9439504e8 100644 --- a/scripts/Dpkg/Archive/Ar.pm +++ b/scripts/Dpkg/Archive/Ar.pm @@ -303,10 +303,10 @@ sub _copy_fh_fh { my $n = $if->{fh}->read($buf, $buflen) or syserr(g_('cannot read file %s'), $if->{name}); - $of->{fh}->write($buf, $buflen) + $of->{fh}->write($buf, $n) or syserr(g_('cannot write file %s'), $of->{name}); - $size -= $buflen; + $size -= $n; } return; -- Dpkg.Org's dpkg

