From f5b5f60b86c11d2f8bad6bd97c7129644171907c Mon Sep 17 00:00:00 2001 From: Ihor Antonov Date: Sun, 28 Jul 2019 17:05:18 -0400 Subject: PVS/V512: memcpy overflow/underflow #10642 problem: bfredl: pvs thinks the type of the pointed at item is too small. solution: refactored address calculation. --- src/nvim/ui_compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/ui_compositor.c b/src/nvim/ui_compositor.c index d0b21ae591..2cb3cf7ee7 100644 --- a/src/nvim/ui_compositor.c +++ b/src/nvim/ui_compositor.c @@ -359,7 +359,7 @@ static void compose_line(Integer row, Integer startcol, Integer endcol, attrbuf[i+1], &thru); } if (thru) { - memcpy(linebuf[i], bg_line[i], (size_t)width * sizeof(linebuf[i])); + memcpy(linebuf + i, bg_line + i, (size_t)width * sizeof(linebuf[i])); } } } -- cgit