Explorar o código

delete Memb on read-error in arfile

Git-Dch: Ignore
Niels Thykier %!s(int64=13) %!d(string=hai) anos
pai
achega
24a67e0954
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      apt-inst/contrib/arfile.cc

+ 3 - 0
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;