Commit ae05f3fa authored by Linus Torvalds's avatar Linus Torvalds

Fix sha256 padding block initializer to be static.

Jakub points out that having an automatic array is not only
bad for performance (and stack usage), gcc has also historically
had lots of bugs here, and gcc-3.2.3 seems to miscompile it
otherwise.
parent 586a9edd
......@@ -295,7 +295,7 @@ static void sha256_final(void* ctx, u8 *out)
u8 bits[8];
unsigned int index, pad_len, t;
int i, j;
const u8 padding[64] = { 0x80, };
static const u8 padding[64] = { 0x80, };
/* Save number of bits */
t = sctx->count[0];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment