]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/contrib/sha256.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 16 May 2006 19:16:15 +0000 (21:16 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 16 May 2006 19:16:15 +0000 (21:16 +0200)
  The patch below fixes the problem by open-coding the ntohl() call and
  combining it with a byte-by-byte load of the 32-bit word.

apt-pkg/contrib/sha256.cc
debian/compat

index a4d258d263e8f637a80658037489db5098676ec2..ad2ddb2d3a5c4691bf9c223a4457a76a8a6cd6c4 100644 (file)
@@ -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)
index 00750edc07d6415dcc07ae0351e9397b0222b7ba..7ed6ff82de6bcc2a78243fc9c54d3ef5ac14da69 100644 (file)
@@ -1 +1 @@
-3
+5