memdup: use memcpy - teed - A multiplex relay tee(1) daemon.
HTML git clone git://bitreich.org/teed git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/teed
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR README
DIR LICENSE
---
DIR commit 18db7808b4a41155537b83db1294720403990b4c
DIR parent 66db6db25fc61d5f44642b2558b9f9b1dcffdab2
HTML Author: Hiltjo Posthuma <hiltjo@codemadness.org>
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 <20h@r-36.net>
Diffstat:
M teed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
DIR 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;
}