summaryrefslogtreecommitdiff
path: root/apt-inst/contrib/arfile.cc
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2013-06-24 13:22:54 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2013-06-24 14:08:01 +0200
commit24a67e0954716697e87f68384eb415e0e0a5796c (patch)
tree44bcd5ae7b595dfc2bce3b6b89acd2319b4bec05 /apt-inst/contrib/arfile.cc
parentf58a9890e345faa04b5fcb2a01cae39f986a42db (diff)
delete Memb on read-error in arfile
Git-Dch: Ignore
Diffstat (limited to 'apt-inst/contrib/arfile.cc')
-rw-r--r--apt-inst/contrib/arfile.cc3
1 files changed, 3 insertions, 0 deletions
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;