Patch 8.2.5075
Problem: Clang gives an out of bounds warning.
Solution: adjust conditional expression (John Marriott)
Files: src/ui.c
*** ../vim-8.2.5074/src/ui.c 2022-05-09 20:09:19.294641425 +0100
--- src/ui.c 2022-06-10 14:49:43.442390561 +0100
***************
*** 897,903 ****
maxlen = inbufcount;
mch_memmove(buf, inbuf, (size_t)maxlen);
inbufcount -= maxlen;
! if (inbufcount)
mch_memmove(inbuf, inbuf + maxlen, (size_t)inbufcount);
return (int)maxlen;
}
--- 897,904 ----
maxlen = inbufcount;
mch_memmove(buf, inbuf, (size_t)maxlen);
inbufcount -= maxlen;
! // check "maxlen" to avoid clang warning
! if (inbufcount > 0 && maxlen > 0)
mch_memmove(inbuf, inbuf + maxlen, (size_t)inbufcount);
return (int)maxlen;
}
*** ../vim-8.2.5074/src/version.c 2022-06-10 00:02:05.624733616 +0100
--- src/version.c 2022-06-10 14:51:35.294375194 +0100
***************
*** 736,737 ****
--- 736,739 ----
{ /* Add new patch number below this line */
+ /**/
+ 5075,
/**/
--
Dreams are free, but there's a small charge for alterations.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220610135537.58FE71C292C%40moolenaar.net.