summaryrefslogtreecommitdiffstats
path: root/src/cmdhist.c
AgeCommit message (Collapse)Author
2024-01-04patch 9.1.0006: is*() and to*() function may be unsafev9.1.0006Keith Thompson
Problem: is*() and to*() function may be unsafe Solution: Add SAFE_* macros and start using those instead (Keith Thompson) Use SAFE_() macros for is*() and to*() functions The standard is*() and to*() functions declared in <ctype.h> have undefined behavior for negative arguments other than EOF. If plain char is signed, passing an unchecked value from argv for from user input to one of these functions has undefined behavior. Solution: Add SAFE_*() macros that cast the argument to unsigned char. Most implementations behave sanely for negative arguments, and most character values in practice are non-negative, but it's still best to avoid undefined behavior. The change from #13347 has been omitted, as this has already been separately fixed in commit ac709e2fc0db6d31abb7da96f743c40956b60c3a (v9.0.2054) fixes: #13332 closes: #13347 Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26patch 9.0.2068: [security] overflow in :historyv9.0.2068Christian Brabandt
Problem: [security] overflow in :history Solution: Check that value fits into int The get_list_range() function, used to parse numbers for the :history and :clist command internally uses long variables to store the numbers. However function arguments are integer pointers, which can then overflow. Check that the return value from the vim_str2nr() function is not larger than INT_MAX and if yes, bail out with an error. I guess nobody uses a cmdline/clist history that needs so many entries... (famous last words). It is only a moderate vulnerability, so impact should be low. Github Advisory: https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm Signed-off-by: Christian Brabandt <cb@256bit.org>
2022-12-26patch 9.0.1098: code uses too much indentv9.0.1098Yegappan Lakshmanan
Problem: Code uses too much indent. Solution: Use an early return. (Yegappan Lakshmanan, closes #11747)
2022-11-14patch 9.0.0878: Coverity warns for dead codev9.0.0878Bram Moolenaar
Problem: Coverity warns for dead code. Solution: Remove the dead code.
2022-11-13patch 9.0.0872: code is indented more than neededv9.0.0872Yegappan Lakshmanan
Problem: Code is indented more than needed. Solution: Return early. (Yegappan Lakshmanan, closes #11538)
2022-08-26patch 9.0.0284: using static buffer for multiple completion functionsv9.0.0284Bram Moolenaar
Problem: Using static buffer for multiple completion functions. Solution: Use one buffer in expand_T.
2022-01-08patch 8.2.4038: various code not used when features are disabledv8.2.4038Dominique Pelle
Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
2022-01-01patch 8.2.3970: error messages are spread outv8.2.3970Bram Moolenaar
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
2021-07-27patch 8.2.3229: Vim9: runtime and compile time type checks are not the samev8.2.3229Yegappan Lakshmanan
Problem: Vim9: runtime and compile time type checks are not the same. Solution: Add more runtime type checks for builtin functions. (Yegappan Lakshmanan, closes #8646)
2021-07-23patch 8.2.3206: Vim9: argument types are not checked at compile timev8.2.3206Yegappan Lakshmanan
Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks. (Yegappan Lakshmanan, closes #8611)
2021-07-20patch 8.2.3188: Vim9: argument types are not checked at compile timev8.2.3188Yegappan Lakshmanan
Problem: Vim9: argument types are not checked at compile time. Solution: Add several more type checks, also at runtime. (Yegappan Lakshmanan, closes #8587)
2021-07-15patch 8.2.3162: Vim9: argument types are not checked at compile timev8.2.3162Yegappan Lakshmanan
Problem: Vim9: argument types are not checked at compile time. Solution: Add more type checks. (Yegappan Lakshmanan, closes #8560)
2021-06-02patch 8.2.2922: computing array length is done in various waysv8.2.2922K.Takata
Problem: Computing array length is done in various ways. Solution: Use ARRAY_LENGTH everywhere. (Ken Takata, closes #8305)
2020-10-24patch 8.2.1898: command modifier parsing always uses global cmdmodv8.2.1898Bram Moolenaar
Problem: Command modifier parsing always uses global cmdmod. Solution: Pass in cmdmod_T to use. Rename struct fields consistently.
2020-07-23patch 8.2.1281: the "trailing characters" error can be hard to understandv8.2.1281Bram Moolenaar
Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message.
2020-02-25patch 8.2.0316: ex_getln.c code has insufficient test coveragev8.2.0316Bram Moolenaar
Problem: ex_getln.c code has insufficient test coverage. Solution: Add more tests. Fix a problem. (Yegappan Lakshmanan, closes #5693)
2019-08-18patch 8.1.1887: the +cmdline_compl feature is not in the tiny versionv8.1.1887Bram Moolenaar
Problem: The +cmdline_compl feature is not in the tiny version. Solution: Graduate the +cmdline_compl feature.
2019-08-06patch 8.1.1823: command line history code is spread outv8.1.1823Bram Moolenaar
Problem: Command line history code is spread out. Solution: Put the code in a new file. (Yegappan Lakshmanan, closes #4779) Also graduate the +cmdline_hist feature.