diff options
author | Ihor Antonov <ngortheone@users.noreply.github.com> | 2019-07-28 17:05:18 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-07-28 23:05:18 +0200 |
commit | f5b5f60b86c11d2f8bad6bd97c7129644171907c (patch) | |
tree | 926afa405b79bf36f60dc3714ee38ff4a192dfc5 | |
parent | fe2ada737510b91655bda3aac4f6385de6410c0d (diff) | |
download | rneovim-f5b5f60b86c11d2f8bad6bd97c7129644171907c.tar.gz rneovim-f5b5f60b86c11d2f8bad6bd97c7129644171907c.tar.bz2 rneovim-f5b5f60b86c11d2f8bad6bd97c7129644171907c.zip |
PVS/V512: memcpy overflow/underflow #10642
problem: bfredl: pvs thinks the type of the pointed
at item is too small.
solution: refactored address calculation.
-rw-r--r-- | src/nvim/ui_compositor.c | 2 |
1 files changed, 1 insertions, 1 deletions
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])); } } } |