From 509a927fcd6d504fc6c18850815b4204af8de298 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sat, 6 Mar 1999 16:31:13 +0000 Subject: [PATCH] Make block non-static and properly aligned --- libraries/liblutil/sha1.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libraries/liblutil/sha1.c b/libraries/liblutil/sha1.c index a40fea4611..98360788bf 100644 --- a/libraries/liblutil/sha1.c +++ b/libraries/liblutil/sha1.c @@ -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 */ -- 2.39.5