memdup: use memcpy - teed - A multiplex relay tee(1) daemon. | |
git clone git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit 18db7808b4a41155537b83db1294720403990b4c | |
parent 66db6db25fc61d5f44642b2558b9f9b1dcffdab2 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Mon, 14 Aug 2023 14:20:34 +0200 | |
memdup: use memcpy | |
No memmove needed, because allocated memory cannot overlap. | |
Signed-off-by: Christoph Lohmann <[email protected]> | |
Diffstat: | |
M teed.c | 2 +- | |
1 file changed, 1 insertion(+), 1 deletion(-) | |
--- | |
diff --git a/teed.c b/teed.c | |
@@ -24,7 +24,7 @@ memdup(void *p, int l) | |
perror("calloc"); | |
exit(1); | |
} | |
- memmove(ret, p, l); | |
+ memcpy(ret, p, l); | |
return (void *)ret; | |
} |