# HG changeset patch # User Bram Moolenaar # Date 1654869605 -7200 # Node ID c1c795a61545de0f3a1b9286077959b65875764d # Parent e5b1a1fd25b66eac37d21110aee4df0c186b7c22 patch 8.2.5075: clang gives an out of bounds warning Commit: https://github.com/vim/vim/commit/b74e04649168aec579183dfef70b8784d2afe993 Author: Bram Moolenaar Date: Fri Jun 10 14:52:35 2022 +0100 patch 8.2.5075: clang gives an out of bounds warning Problem: Clang gives an out of bounds warning. Solution: adjust conditional expression (John Marriott) diff --git a/src/ui.c b/src/ui.c --- a/src/ui.c +++ b/src/ui.c @@ -897,7 +897,8 @@ read_from_input_buf(char_u *buf, long ma maxlen = inbufcount; mch_memmove(buf, inbuf, (size_t)maxlen); inbufcount -= maxlen; - if (inbufcount) + // check "maxlen" to avoid clang warning + if (inbufcount > 0 && maxlen > 0) mch_memmove(inbuf, inbuf + maxlen, (size_t)inbufcount); return (int)maxlen; } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 5075, +/**/ 5074, /**/ 5073,