]> git.sur5r.net Git - openldap/commitdiff
Make block non-static and properly aligned
authorHallvard Furuseth <hallvard@openldap.org>
Sat, 6 Mar 1999 16:31:13 +0000 (16:31 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Sat, 6 Mar 1999 16:31:13 +0000 (16:31 +0000)
libraries/liblutil/sha1.c

index a40fea46115dc1c3b16a836b360c0137f52b3c46..98360788bf5d0bdabe50365d159be17df39c6061 100644 (file)
@@ -65,14 +65,12 @@ lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
        unsigned char c[64];
        u_int l[16];
     } CHAR64LONG16;
-    CHAR64LONG16 *block;
 
 #ifdef SHA1HANDSOFF
-    static unsigned char workspace[64];
-    block = (CHAR64LONG16 *)workspace;
+    CHAR64LONG16 block[1];
     (void)memcpy(block, buffer, 64);
 #else
-    block = (CHAR64LONG16 *)buffer;
+    CHAR64LONG16 *block = (CHAR64LONG16 *)buffer;
 #endif
 
     /* Copy context->state[] to working vars */