From: Debian Qt/KDE Maintainers Date: Tue, 5 Feb 2013 21:52:29 +0000 (+0000) Subject: _hppa_unaligned_access_fix_458133 X-Git-Tag: archive/raspbian/4%4.8.7+dfsg-15+rpi1~1^2^2^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=309469e04346a22b0923320f719154cf36b77213;p=qt4-x11.git _hppa_unaligned_access_fix_458133 Fix unaligned access on hppa Gbp-Pq: Name 71_hppa_unaligned_access_fix_458133.diff --- diff --git a/src/3rdparty/sha1/sha1.cpp b/src/3rdparty/sha1/sha1.cpp index 6270140a7..64f891002 100644 --- a/src/3rdparty/sha1/sha1.cpp +++ b/src/3rdparty/sha1/sha1.cpp @@ -149,10 +149,10 @@ static inline void sha1ProcessChunk(Sha1State *state, const unsigned char *buffe 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(&chunkBuffer); + Sha1Chunk *chunk = &chunkBuffer; for (int i = 0; i < 16; ++i) chunk->words[i] = qFromBigEndian(chunk->words[i]); @@ -188,7 +188,7 @@ static inline void sha1ProcessChunk(Sha1State *state, const unsigned char *buffe // Wipe variables #ifdef SHA1_WIPE_VARIABLES a = b = c = d = e = 0; - memset(chunkBuffer, 0, 64); + memset(chunkBuffer.bytes, 0, 64); #endif }