28 lines
944 B
Diff
28 lines
944 B
Diff
From 5e9199f293473a0c14f836b3df8ecf6aeed1e315 Mon Sep 17 00:00:00 2001
|
||
From: Zack Weinberg <zackw@panix.com>
|
||
Date: Mon, 12 Nov 2018 11:17:01 -0500
|
||
Subject: [PATCH] alg-sha512.c: Make PAD const.
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
This object is only ever read, not written, and the code expects it
|
||
won’t ever change.
|
||
---
|
||
alg-sha512.c | 2 +-
|
||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
||
diff --git a/alg-sha512.c b/alg-sha512.c
|
||
index 8913da3..d3e83b3 100644
|
||
--- a/alg-sha512.c
|
||
+++ b/alg-sha512.c
|
||
@@ -204,7 +204,7 @@ SHA512_Transform(uint64_t * state, const unsigned char block[SHA512_BLOCK_LENGTH
|
||
state[i] += S[i];
|
||
}
|
||
|
||
-static unsigned char PAD[SHA512_BLOCK_LENGTH] = {
|
||
+static const unsigned char PAD[SHA512_BLOCK_LENGTH] = {
|
||
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|