From dd8efd4870ff2833ed7bda79a112e8888c90794d Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Thu, 7 Jan 2021 13:36:49 +0100 Subject: [PATCH] daemon/http: use memmove() for session buffer write Since session buffer contains both the raw http data and the resulting decoded DNS packet, memmove() should be used instead of memcpy(). --- daemon/http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/http.c b/daemon/http.c index 7e52b8dfd..f72465f65 100644 --- a/daemon/http.c +++ b/daemon/http.c @@ -362,7 +362,7 @@ static int data_chunk_recv_callback(nghttp2_session *h2, uint8_t flags, int32_t queue_push(ctx->streams, stream_id); } - memcpy(ctx->buf + ctx->buf_pos, data, len); + memmove(ctx->buf + ctx->buf_pos, data, len); ctx->buf_pos += len; return 0; } -- 2.47.2