]> git.saurik.com Git - apt.git/commitdiff
* fix http data corruption (#280844)
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 10 Jan 2006 16:46:30 +0000 (16:46 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 10 Jan 2006 16:46:30 +0000 (16:46 +0000)
Patches applied:

 * mvo@debian.org--2005/apt--debian-experimental--0--patch-12
   * added http data corruption fix patch (#280844)

configure.in
debian/changelog
methods/http.cc

index b975031e57ec2a6a3bb01d7f21ef8958f9d6cd44..0d80e5ed9a31eeaaef13a884ee96a26de5172ddb 100644 (file)
@@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib)
 AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
 
 dnl -- SET THIS TO THE RELEASE VERSION --
-AC_DEFINE_UNQUOTED(VERSION,"0.6.43.1")
+AC_DEFINE_UNQUOTED(VERSION,"0.6.43.2")
 PACKAGE="apt"
 AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
 AC_SUBST(PACKAGE)
index 5e14a92f97456e9e3eaf9f217404934712f995cb..020fe9813e75f91ede019acec48b54f70ffe0ffc 100644 (file)
@@ -9,8 +9,10 @@ apt (0.6.43.2) unstable; urgency=low
     - sk.po: Completed to 511t. Closes: #346369
     - fr.po: Completed to 511t
     - *.po: Updated from sources (511 strings)
+  * add patch to fix http download corruption problem (thanks to
+    Petr Vandrovec, closes: #280844, #290694)
 
- --
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 10 Jan 2006 17:09:31 +0100
 
 apt (0.6.43.1) unstable; urgency=low
 
index dc3f0b7639f7d5f34530b65a1adea7bb5b0eddcc..341de94e37ab046c3e2a1360bdd16f0f96a5c7dc 100644 (file)
@@ -241,28 +241,23 @@ bool CircleBuf::WriteTillEl(string &Data,bool Single)
       if (Buf[I%Size] != '\n')
         continue;
       ++I;
-      if (I < InP  && Buf[I%Size] == '\r')
-         ++I;
       
       if (Single == false)
       {
-        if (Buf[I%Size] != '\n')
-           continue;
-         ++I;
          if (I < InP  && Buf[I%Size] == '\r')
             ++I;
+         if (I >= InP || Buf[I%Size] != '\n')
+            continue;
+         ++I;
       }
       
-      if (I > InP)
-        I = InP;
-      
       Data = "";
       while (OutP < I)
       {
         unsigned long Sz = LeftWrite();
         if (Sz == 0)
            return false;
-        if (I - OutP < LeftWrite())
+        if (I - OutP < Sz)
            Sz = I - OutP;
         Data += string((char *)(Buf + (OutP%Size)),Sz);
         OutP += Sz;