]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/sha1.c
Vienna Bulk Commit
[openldap] / libraries / liblutil / sha1.c
index a40fea46115dc1c3b16a836b360c0137f52b3c46..a0df8ac95b2a0aca78d819f3c783a312883f5c2e 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 */
@@ -140,7 +138,7 @@ void
 lutil_SHA1Update(
     lutil_SHA1_CTX     *context,
     const unsigned char        *data,
-    u_int              len
+    uint32             len
 )
 {
     u_int i, j;