Explorar o código

* Patch from Jason Gunthorpe to remove arbitrary length...
Author: mdz
Date: 2004-03-24 01:40:43 GMT
* Patch from Jason Gunthorpe to remove arbitrary length limit on Binary
field in SourcesWriter::DoPackage

Arch Librarian %!s(int64=22) %!d(string=hai) anos
pai
achega
5200ec6faf
Modificáronse 2 ficheiros con 5 adicións e 3 borrados
  1. 2 0
      debian/changelog
  2. 3 3
      ftparchive/writer.cc

+ 2 - 0
debian/changelog

@@ -3,6 +3,8 @@ apt (0.5.25) unstable; urgency=low
   * Fix typo in apt-cache(8) (Closes: #238578)
   * Fix typo in apt-cache(8) (Closes: #238578)
   * Updated Swedish translation from Peter Karlsson  <peter@softwolves.pp.se>
   * Updated Swedish translation from Peter Karlsson  <peter@softwolves.pp.se>
     (Closes: #238943)
     (Closes: #238943)
+  * Patch from Jason Gunthorpe to remove arbitrary length limit on Binary
+    field in SourcesWriter::DoPackage
 
 
  --
  --
 
 

+ 3 - 3
ftparchive/writer.cc

@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // -*- mode: cpp; mode: fold -*-
 // Description								/*{{{*/
 // 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 
    Writer 
@@ -555,10 +555,10 @@ bool SourcesWriter::DoPackage(string FileName)
       
       
    // Lookup the overide information, finding first the best priority.
    // Lookup the overide information, finding first the best priority.
    string BestPrio;
    string BestPrio;
-   char Buffer[1000];
    string Bins = Tags.FindS("Binary");
    string Bins = Tags.FindS("Binary");
+   char Buffer[Bins.length() + 1];
    Override::Item *OverItem = 0;
    Override::Item *OverItem = 0;
-   if (Bins.empty() == false && Bins.length() < sizeof(Buffer))
+   if (Bins.empty() == false)
    {
    {
       strcpy(Buffer,Bins.c_str());
       strcpy(Buffer,Bins.c_str());