summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-05-16 21:16:15 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-05-16 21:16:15 +0200
commit4bbffb86b668e067bf930ae8a57aebc4afa33de5 (patch)
treecd539151f4d59b676be4f6d07f7e42b833ef350b
parenteb2bc4f206faf5b8c67f09f3a92b3dea453e2b87 (diff)
* apt-pkg/contrib/sha256.cc:
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.
-rw-r--r--apt-pkg/contrib/sha256.cc5
-rw-r--r--debian/compat2
2 files changed, 5 insertions, 2 deletions
diff --git a/apt-pkg/contrib/sha256.cc b/apt-pkg/contrib/sha256.cc
index a4d258d26..ad2ddb2d3 100644
--- a/apt-pkg/contrib/sha256.cc
+++ b/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)
diff --git a/debian/compat b/debian/compat
index 00750edc0..7ed6ff82d 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-3
+5