aboutsummaryrefslogtreecommitdiffstats
path: root/update.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-07-07 15:32:34 +0200
committerMattias Andrée <maandree@kth.se>2022-07-07 15:32:34 +0200
commitc44852846418d687027912d4150404feed0161f9 (patch)
tree8e08a8420179dfe2909c9a77573c5f537a85818c /update.c
parentDon't marshal w (diff)
downloadlibsha2-c44852846418d687027912d4150404feed0161f9.tar.gz
libsha2-c44852846418d687027912d4150404feed0161f9.tar.bz2
libsha2-c44852846418d687027912d4150404feed0161f9.tar.xz
Use malloc by default but allow bounded alloca
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--update.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/update.c b/update.c
index 8d0610d..4cf31a5 100644
--- a/update.c
+++ b/update.c
@@ -14,7 +14,7 @@ libsha2_update(struct libsha2_state *restrict state, const void *restrict messag
if (off) {
n = msglen < state->chunk_size - off ? msglen : state->chunk_size - off;
- memcpy(state->chunk + off, message, n);
+ memcpy(&state->chunk[off], message, n);
if (off + n == state->chunk_size)
libsha2_process(state, state->chunk);
message += n;