From 41e75daed7368f79a1ac5a51a9a547e550d61a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arttu=20Yl=C3=A4-Outinen?= Date: Tue, 14 Jun 2016 16:19:43 +0900 Subject: [PATCH] Fix overlapping memcpy in kvz_search_cu_smp. The destination and source pointers might be equal. Fixed by replacing the memcpy call with a simple assignment. --- src/search_inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search_inter.c b/src/search_inter.c index 231d222e..94e3dca7 100644 --- a/src/search_inter.c +++ b/src/search_inter.c @@ -1654,7 +1654,7 @@ void kvz_search_cu_smp(encoder_state_t * const state, for (int x = x_pu; x < x_pu + width_pu; ++x) { cu_info_t *scu = LCU_GET_CU(lcu, x, y); scu->type = CU_INTER; - memcpy(&scu->inter, &cur_pu->inter, sizeof(cur_pu->inter)); + scu->inter = cur_pu->inter; } } }