summaryrefslogtreecommitdiff
path: root/Modules/_blake2/impl/blake2b.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-08 13:40:25 +0200
committerChristian Heimes <christian@python.org>2016-09-08 13:40:25 +0200
commit5940c535b06805960d008bcafec7260dae74d9b9 (patch)
tree3aaf6be1691c520b69d68c50d9dd26a14d184182 /Modules/_blake2/impl/blake2b.c
parentcf45ee10fba914bd28a379f0c64e4113d2dc46df (diff)
downloadcpython-git-5940c535b06805960d008bcafec7260dae74d9b9.tar.gz
Issue #26798: Coverity complains about potential memcpy() of overlapped regions. It doesn't hurt to use memmove() here. CID 1372514 / CID 1372515. Upstream https://github.com/BLAKE2/BLAKE2/issues/32
Diffstat (limited to 'Modules/_blake2/impl/blake2b.c')
-rw-r--r--Modules/_blake2/impl/blake2b.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_blake2/impl/blake2b.c b/Modules/_blake2/impl/blake2b.c
index 58c79fa848..ebb65bb139 100644
--- a/Modules/_blake2/impl/blake2b.c
+++ b/Modules/_blake2/impl/blake2b.c
@@ -371,7 +371,7 @@ int blake2b_final( blake2b_state *S, uint8_t *out, uint8_t outlen )
blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );
blake2b_compress( S, S->buf );
S->buflen -= BLAKE2B_BLOCKBYTES;
- memcpy( S->buf, S->buf + BLAKE2B_BLOCKBYTES, S->buflen );
+ memmove( S->buf, S->buf + BLAKE2B_BLOCKBYTES, S->buflen );
}
blake2b_increment_counter( S, S->buflen );