From bf35c19b817cc1474b3deabce0b0953c248bad42 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 25 May 2013 20:27:33 +0200 Subject: don't explicitly init ExtractTar InFd with invalid fd The default constructor of the FileFd will kick in anyway, which will know that the Fd is invalid while with this explicit call it must be assumed that the fd is in fact valid, which might generate errors in the future --- apt-inst/contrib/extracttar.cc | 1 - 1 file changed, 1 deletion(-) (limited to 'apt-inst') diff --git a/apt-inst/contrib/extracttar.cc b/apt-inst/contrib/extracttar.cc index 806ba796d..49ed5db56 100644 --- a/apt-inst/contrib/extracttar.cc +++ b/apt-inst/contrib/extracttar.cc @@ -63,7 +63,6 @@ ExtractTar::ExtractTar(FileFd &Fd,unsigned long Max,string DecompressionProgram) { GZPid = -1; - InFd = -1; Eof = false; } /*}}}*/ -- cgit v1.2.3 From 564fcbf93c78deb48fa44a9a63b5602eedfa53a9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 28 May 2013 18:48:28 +0200 Subject: depend on libapt-pkg in the libapt-inst build process MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fixing parallel build in the handcrafted buildsystem is a pain, so its not enabled by default, but its works for me – sometimes Git-Dch: Ignore --- apt-inst/makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-inst') diff --git a/apt-inst/makefile b/apt-inst/makefile index cfb22741a..da983df5f 100644 --- a/apt-inst/makefile +++ b/apt-inst/makefile @@ -18,6 +18,7 @@ MAJOR=1.5 MINOR=0 SLIBS=$(PTHREADLIB) -lapt-pkg APT_DOMAIN:=libapt-inst$(MAJOR) +LIBRARYDEPENDS=$(LIB)/libapt-pkg.so # Source code for the contributed non-core things SOURCE = contrib/extracttar.cc contrib/arfile.cc -- cgit v1.2.3 From 24a67e0954716697e87f68384eb415e0e0a5796c Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Mon, 24 Jun 2013 13:22:54 +0200 Subject: delete Memb on read-error in arfile Git-Dch: Ignore --- apt-inst/contrib/arfile.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apt-inst') diff --git a/apt-inst/contrib/arfile.cc b/apt-inst/contrib/arfile.cc index 2dee1a40d..d7ee528ba 100644 --- a/apt-inst/contrib/arfile.cc +++ b/apt-inst/contrib/arfile.cc @@ -106,7 +106,10 @@ bool ARArchive::LoadHeaders() return _error->Error(_("Invalid archive member header")); } if (File.Read(S,Len) == false) + { + delete Memb; return false; + } S[Len] = 0; Memb->Name = S; Memb->Size -= Len; -- cgit v1.2.3