X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d6689735f2f19c2f9b551096963c7daf72e0dbb2..b5a03bc137dc014f86926029e9074b5382aaac15:/ftparchive/writer.cc diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index bc03492f4..35a23a3d7 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: writer.cc,v 1.13 2004/01/04 00:20:59 mdz Exp $ +// $Id: writer.cc,v 1.14 2004/03/24 01:40:43 mdz Exp $ /* ###################################################################### Writer @@ -555,10 +555,10 @@ bool SourcesWriter::DoPackage(string FileName) // Lookup the overide information, finding first the best priority. string BestPrio; - char Buffer[1000]; string Bins = Tags.FindS("Binary"); + char Buffer[Bins.length() + 1]; Override::Item *OverItem = 0; - if (Bins.empty() == false && Bins.length() < sizeof(Buffer)) + if (Bins.empty() == false) { strcpy(Buffer,Bins.c_str()); @@ -754,7 +754,7 @@ bool ContentsWriter::ReadFromPkgs(string PkgFile,string PkgCompress) // Open the package file int CompFd = -1; - int Proc = -1; + pid_t Proc = -1; if (Pkgs.OpenOld(CompFd,Proc) == false) return false;