Browse Source

* merged from the aj-ftparchive-improvements branch

Michael Vogt 20 years ago
parent
commit
6479b90240
2 changed files with 7 additions and 1 deletions
  1. 4 1
      apt-pkg/contrib/sha256.cc
  2. 3 0
      debian/changelog

+ 4 - 1
apt-pkg/contrib/sha256.cc

@@ -61,7 +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] = ntohl( ((u32*)(input))[I] );
+	W[I] = (  ((u32) input[I + 0] << 24)
+		| ((u32) input[I + 1] << 16)
+		| ((u32) input[I + 2] << 8)
+		| ((u32) input[I + 3]));
 }
 
 static inline void BLEND_OP(int I, u32 *W)

+ 3 - 0
debian/changelog

@@ -7,6 +7,9 @@ apt (0.6.44.1) unstable; urgency=low
     - po/LINGUAS: added "bg" Closes: #360262
     - po/gl.po: Galician translation update. Closes: #366849
     - po/hu.po: Hungarian translation update. Closes: #365448
+  * apt-pkg/contrib/sha256.cc:
+    - applied patch to fix unaligned access problem. Closes: #367417
+      (thanks to David Mosberger)
 
  --