mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 8.2.4298: divide by zero with huge tabstop value
Problem: Divide by zero with huge tabstop value. Solution: Reject tabstop value that overflows to zero.
This commit is contained in:
@@ -71,7 +71,7 @@ tabstop_set(char_u *var, int **array)
|
||||
int n = atoi((char *)cp);
|
||||
|
||||
// Catch negative values, overflow and ridiculous big values.
|
||||
if (n < 0 || n > TABSTOP_MAX)
|
||||
if (n <= 0 || n > TABSTOP_MAX)
|
||||
{
|
||||
semsg(_(e_invalid_argument_str), cp);
|
||||
vim_free(*array);
|
||||
|
Reference in New Issue
Block a user