Displaying 1 result from an estimated 1 matches for "m_buf".
Did you mean:
_buf
2013 Jun 09
1
[PATCH] fix mac_computer
...i at windriver.com>
---
mac.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/mac.c
+++ b/mac.c
@@ -132,12 +132,14 @@ mac_init(Mac *mac)
u_char *
mac_compute(Mac *mac, u_int32_t seqno, u_char *data, int datalen)
{
- static u_char m[EVP_MAX_MD_SIZE];
+ static u_int64_t m_buf[(EVP_MAX_MD_SIZE + sizeof (u_int64_t) - 1)
+ / sizeof (u_int64_t)];
+ u_char *m = (u_char *)m_buf;
u_char b[4], nonce[8];
- if (mac->mac_len > sizeof(m))
+ if (mac->mac_len > EVP_MAX_MD_SIZE)
fatal("mac_compute: mac too long %u %lu",
- mac->mac_len, (u_long)...