Package: qt4-x11 / 4:4.8.7+dfsg-18

71_hppa_unaligned_access_fix_458133.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
author: Bernhard R. Link <brlink@debian.org>

Fix unaligned access on hppa

---
 src/3rdparty/sha1/sha1.cpp |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/src/3rdparty/sha1/sha1.cpp
+++ b/src/3rdparty/sha1/sha1.cpp
@@ -150,10 +150,10 @@ static inline void sha1ProcessChunk(Sha1
     quint32 d = state->h3;
     quint32 e = state->h4;
 
-    quint8 chunkBuffer[64];
-    memcpy(chunkBuffer, buffer, 64);
+    Sha1Chunk chunkBuffer;
+    memcpy(chunkBuffer.bytes, buffer, 64);
 
-    Sha1Chunk *chunk = reinterpret_cast<Sha1Chunk*>(&chunkBuffer);
+    Sha1Chunk *chunk = &chunkBuffer;
 
     for (int i = 0; i < 16; ++i)
         chunk->words[i] = qFromBigEndian(chunk->words[i]);
@@ -189,7 +189,7 @@ static inline void sha1ProcessChunk(Sha1
     // Wipe variables
 #ifdef SHA1_WIPE_VARIABLES
     a = b = c = d = e = 0;
-    memset(chunkBuffer, 0, 64);
+    memset(chunkBuffer.bytes, 0, 64);
 #endif
 }