Store the partial block as uint8_t, not uint32_t.
The uint32_t likely dates to them using HASH_LONG everywhere. Nothing ever
touches c->data as a uint32_t, only bytes. (Which makes sense seeing as it
stores the partial block.)
Change-Id: I634cb7f2b6306523aa663f8697b7dc92aa491320
Reviewed-on: https://boringssl-review.googlesource.com/6651
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/sha.h b/include/openssl/sha.h
index fec2927..48a52e8 100644
--- a/include/openssl/sha.h
+++ b/include/openssl/sha.h
@@ -115,7 +115,7 @@
};
#endif
uint32_t Nl, Nh;
- uint32_t data[16];
+ uint8_t data[SHA_CBLOCK];
unsigned num;
};
@@ -176,7 +176,7 @@
struct sha256_state_st {
uint32_t h[8];
uint32_t Nl, Nh;
- uint32_t data[16];
+ uint8_t data[SHA256_CBLOCK];
unsigned num, md_len;
};