diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-10-18 02:11:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-17 17:11:23 -0700 |
commit | aff444659e59a16da7e225b9f820a884a05044e6 (patch) | |
tree | 6a4d10fe8436e67b48282e4ca69fa90f5609d5c2 /src/nvim/option.c | |
parent | ffc28dcbdb0d3ea7f1f70d1f9627d423f950d224 (diff) | |
download | rneovim-aff444659e59a16da7e225b9f820a884a05044e6.tar.gz rneovim-aff444659e59a16da7e225b9f820a884a05044e6.tar.bz2 rneovim-aff444659e59a16da7e225b9f820a884a05044e6.zip |
fix(PVS/V1028): prevent possible overflow #16023
Full warning: "Possible overflow. Consider casting operands, not the
result."
https://pvs-studio.com/en/docs/warnings/v1028/
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 9466e841ce..a8b86ec0a0 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3510,7 +3510,7 @@ static char_u *set_chars_option(win_T *wp, char_u **varp, bool set) xfree(wp->w_p_lcs_chars.multispace); } if (multispace_len > 0) { - wp->w_p_lcs_chars.multispace = xmalloc((size_t)(multispace_len + 1) * sizeof(int)); + wp->w_p_lcs_chars.multispace = xmalloc(((size_t)multispace_len + 1) * sizeof(int)); wp->w_p_lcs_chars.multispace[multispace_len] = NUL; } else { wp->w_p_lcs_chars.multispace = NULL; |