From f4f4a1aa8dec678b6f34abcbcb8efd5b75966028 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Sun, 3 Dec 2000 21:12:58 +0000 Subject: [PATCH] use do_fd_copy when extracting ar files --- ChangeLog | 4 ++++ dpkg-deb/extract.c | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 25dbbab9..b8e798a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun Dec 3 22:11:22 CET 2000 Wichert Akkerman + + * dpkg-deb/extract.c: apply one of Adams do_fd_copy patches + Thu Nov 30 02:45:42 CET 2000 Wichert Akkerman * scripts/dpkg-statoverride.{pl,8}: diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c index 13992a8a..dc4e072c 100644 --- a/dpkg-deb/extract.c +++ b/dpkg-deb/extract.c @@ -245,13 +245,8 @@ void extracthalf(const char *debar, const char *directory, m_pipe(p1); if (!(c1= m_fork())) { close(p1[0]); - if (!(pi= fdopen(p1[1],"w"))) ohshite(_("failed to fdopen p1 in copy")); - while (memberlen > 0) { - if ((c= getc(ar)) == EOF) readfail(ar,debar,_("member data")); - if (putc(c,pi) == EOF) ohshite(_("failed to write to pipe in copy")); - memberlen--; - } - if (fclose(pi) == EOF) ohshite(_("failed to close pipe in copy")); + do_fd_copy(fileno(ar), p1[1], memberlen, _("failed to write to pipe in copy")); + if (close(p1[1]) == EOF) ohshite(_("failed to close pipe in copy")); exit(0); } close(p1[1]); -- 2.39.5