diff options
| author | Christian Heimes <christian@python.org> | 2016-09-08 13:40:25 +0200 |
|---|---|---|
| committer | Christian Heimes <christian@python.org> | 2016-09-08 13:40:25 +0200 |
| commit | 5940c535b06805960d008bcafec7260dae74d9b9 (patch) | |
| tree | 3aaf6be1691c520b69d68c50d9dd26a14d184182 /Modules/_blake2/impl/blake2b-ref.c | |
| parent | cf45ee10fba914bd28a379f0c64e4113d2dc46df (diff) | |
| download | cpython-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-ref.c')
| -rw-r--r-- | Modules/_blake2/impl/blake2b-ref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_blake2/impl/blake2b-ref.c b/Modules/_blake2/impl/blake2b-ref.c index ec775b4d4b..ab375a499c 100644 --- a/Modules/_blake2/impl/blake2b-ref.c +++ b/Modules/_blake2/impl/blake2b-ref.c @@ -334,7 +334,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 ); |
