Ubuntu Pastebin

Paste from goldendict at Fri, 3 Jun 2016 13:55:24 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
--- goldendict-1.5.0~git20160508.g92b5485.orig/ripemd.cc
+++ goldendict-1.5.0~git20160508.g92b5485/ripemd.cc
@@ -171,9 +171,16 @@ void RIPEMD128::update( const uint8_t *
   memcpy( &buffer[j], &data[i], len - i );
 }

+#ifndef av_bswap64
+static inline uint64_t av_bswap64(uint64_t x)
+{
+       return (uint64_t)qFromLittleEndian<uint32_t>(x) << 32 | qFromLittleEndian<uint32_t>(x >> 32);
+}
+#endif
+
 void RIPEMD128::digest( uint8_t * digest )
 {
-  uint64_t finalcount = qFromLittleEndian( count << 3 );
+  uint64_t finalcount = av_bswap64( count << 3 );
   update( (const uint8_t *) "\200", 1 );
   while ( ( count & 63 ) != 56 )
     update( ( const uint8_t * ) "", 1 );
Download as text