[svn] gcry - r1344 - trunk/src

svn author wk cvs at cvs.gnupg.org
Sat Sep 20 12:00:36 CEST 2008


Author: wk
Date: 2008-09-20 12:00:36 +0200 (Sat, 20 Sep 2008)
New Revision: 1344

Modified:
   trunk/src/hmac256.c
Log:
fix sigbus


Modified: trunk/src/hmac256.c
===================================================================
--- trunk/src/hmac256.c	2008-09-18 15:56:54 UTC (rev 1343)
+++ trunk/src/hmac256.c	2008-09-20 10:00:36 UTC (rev 1344)
@@ -271,10 +271,12 @@
   /* Store the digest into hd->buf.  */
   p = hd->buf;
 #ifdef WORDS_BIGENDIAN
-#define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
+#define X(a) do { *p++ = hd->h##a;       *p++ = hd->h##a >> 8;   \
+		  *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0)
 #else /* little endian */
 #define X(a) do { *p++ = hd->h##a >> 24; *p++ = hd->h##a >> 16;	 \
 		  *p++ = hd->h##a >> 8; *p++ = hd->h##a; } while(0)
+
 #endif
   X(0);
   X(1);




More information about the Gnupg-commits mailing list