]> git.saurik.com Git - apt.git/commitdiff
* merged with mainline
authorMichael Vogt <egon@bottom>
Tue, 25 Jul 2006 07:37:35 +0000 (09:37 +0200)
committerMichael Vogt <egon@bottom>
Tue, 25 Jul 2006 07:37:35 +0000 (09:37 +0200)
apt-pkg/contrib/sha256.cc
debian/changelog
ftparchive/cachedb.cc
test/hash.cc

index ad2ddb2d3a5c4691bf9c223a4457a76a8a6cd6c4..b75ce8a84e7d82ad0fda5dc89c1e48a47b5764a8 100644 (file)
@@ -61,10 +61,10 @@ static inline u32 Maj(u32 x, u32 y, u32 z)
 
 static inline void LOAD_OP(int I, u32 *W, const u8 *input)
 {
-       W[I] = (  ((u32) input[I + 0] << 24)
-               | ((u32) input[I + 1] << 16)
-               | ((u32) input[I + 2] << 8)
-               | ((u32) input[I + 3]));
+       W[I] = (  ((u32) input[I * 4 + 0] << 24)
+               | ((u32) input[I * 4 + 1] << 16)
+               | ((u32) input[I * 4 + 2] << 8)
+               | ((u32) input[I * 4 + 3]));
 }
 
 static inline void BLEND_OP(int I, u32 *W)
index 56e4c35f46bf520762426de58072cf822386a4f4..a9214c51527c21f39318437233b14759d5b322d3 100644 (file)
@@ -1,20 +1,30 @@
-apt (0.6.44.2) unstable; urgency=low
+apt (0.6.45) unstable; urgency=low
 
-  * apt-pkg/depcache.cc:
-    - added Debug::pkgDepCache::AutoInstall (thanks to infinity)
-  * apt-pkg/acquire-item.cc:
-    - fix missing chmod() in the new aquire code 
-      (thanks to Bastian Blank, Closes: #367425)
-  * merged from 
-    http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main:
-    * sk.po: Completed to 512t
-    * eu.po: Completed to 512t
-    * fr.po: Completed to 512t
-    * sv.po: Completed to 512t
-    * Update all PO and the POT. Gives 506t6f for formerly
-      complete translations
-
- -- Michael Vogt <mvo@debian.org>  Wed, 14 Jun 2006 12:00:57 +0200
+  * apt-pkg/contrib/sha256.cc:
+    - fixed the sha256 generation (closes: #378183)
+  * ftparchive/cachedb.cc:
+    - applied patch from ajt to fix Clean() function
+      (closes: #379576)
+
+ --
+
+apt  (0.6.44.2) unstable; urgency=low 
+  
+   * apt-pkg/depcache.cc:
+     - added Debug::pkgDepCache::AutoInstall (thanks to infinity)
+   * apt-pkg/acquire-item.cc:
+     - fix missing chmod() in the new aquire code
+       (thanks to Bastian Blank, Closes: #367425)
+   * merged from
+     http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main:
+     * sk.po: Completed to 512t
+     * eu.po: Completed to 512t
+     * fr.po: Completed to 512t
+     * sv.po: Completed to 512t
+     * Update all PO and the POT. Gives 506t6f for formerly
+       complete translations
+
+ -- Michael Vogt <mvo@debian.org>  Wed, 14 Jun 2006 12:00:57 +0200 
 
 apt (0.6.44.1-0.1) unstable; urgency=low
 
index 0e6078642ad4833b6aa4bb200096774032389e33..8a4ca023669361e32d23b25a8638be551a77c03d 100644 (file)
@@ -453,15 +453,14 @@ bool CacheDB::Clean()
    memset(&Data,0,sizeof(Data));
    while ((errno = Cursor->c_get(Cursor,&Key,&Data,DB_NEXT)) == 0)
    {
-      const char *Colon = (char *)Key.data;
-      for (; Colon != (char *)Key.data+Key.size && *Colon != ':'; Colon++);
-      if ((char *)Key.data+Key.size - Colon > 2)
+      const char *Colon = (char*)memrchr(Key.data, ':', Key.size);
+      if (Colon)
       {
-        if (stringcmp((char *)Key.data,Colon,"st") == 0 ||
-            stringcmp((char *)Key.data,Colon,"cn") == 0 ||
-            stringcmp((char *)Key.data,Colon,"cl") == 0)
+         if (stringcmp(Colon + 1, (char *)Key.data+Key.size,"st") == 0 ||
+             stringcmp(Colon + 1, (char *)Key.data+Key.size,"cl") == 0 ||
+             stringcmp(Colon + 1, (char *)Key.data+Key.size,"cn") == 0)
         {
-           if (FileExists(string(Colon+1,(const char *)Key.data+Key.size)) == true)
+            if (FileExists(string((const char *)Key.data,Colon)) == true)
                continue;            
         }
       }
index 5334c03310ea7a943e62a225bd8ed28d36337a88..cfdb4ea9d430c46c7357854193101139181e1aff 100644 (file)
@@ -1,5 +1,6 @@
 #include <apt-pkg/md5.h>
 #include <apt-pkg/sha1.h>
+#include <apt-pkg/sha256.h>
 #include <apt-pkg/strutl.h>
 #include <iostream>
 
@@ -57,6 +58,12 @@ int main()
                      "d174ab98d277d9f5a5611c2c9f419d9f");
    Test<MD5Summation>("12345678901234567890123456789012345678901234567890123456789012345678901234567890",
                      "57edf4a22be3c955ac49da2e2107b67a");
+
+   // SHA-256, From FIPS 180-2
+   Test<SHA256Summation>("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", 
+                        "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1");
+   
+
    return 0; 
 }