From 6f96368d8620345a98e148436b96f4262ca73972 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 7 Jul 2022 11:37:52 +0200 Subject: Use malloc by default but allow bounded alloca MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'update.c') diff --git a/update.c b/update.c index 1725eb8..8799061 100644 --- a/update.c +++ b/update.c @@ -21,7 +21,7 @@ libsha1_update(struct libsha1_state *restrict state, const void *restrict messag if (off) { n = msglen < sizeof(state->chunk) - off ? msglen : sizeof(state->chunk) - off; - memcpy(state->chunk + off, message, n); + memcpy(&state->chunk[off], message, n); if (off + n == sizeof(state->chunk)) libsha1_process(state, state->chunk); message += n; -- cgit v1.2.3-70-g09d2