projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
408d137
)
Fix potentially undefined behaviour when computing a sha1 value.
author
Nick Clifton
<nickc@redhat.com>
Tue, 16 Mar 2021 14:43:17 +0000
(14:43 +0000)
committer
Nick Clifton
<nickc@redhat.com>
Tue, 16 Mar 2021 14:43:17 +0000
(14:43 +0000)
libiberty/
* sha1.c (sha1_process_bytes): Use memmove in place of memcpy.
libiberty/sha1.c
patch
|
blob
|
history
diff --git
a/libiberty/sha1.c
b/libiberty/sha1.c
index
e3d7f86
..
7d15d48
100644
(file)
--- a/
libiberty/sha1.c
+++ b/
libiberty/sha1.c
@@
-258,7
+258,7
@@
sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
{
sha1_process_block (ctx->buffer, 64, ctx);
left_over -= 64;
- mem
cpy
(ctx->buffer, &ctx->buffer[16], left_over);
+ mem
move
(ctx->buffer, &ctx->buffer[16], left_over);
}
ctx->buflen = left_over;
}