2016-04-21 16:00 GMT+03:00 Lekare <[email protected]>: > There is no handling for limits or stride greater/smaller than > LONG_MAX/LONG_MIN in the range() function. > Instead the results vary from the error message "E727: Start past end" when > at least one of the arguments are close to the limit ex: > > :put =range(2147483647,2147483648) > > to an output of a seemingly random list of negative numbers, ex: > > :put =range(2220500000,2220600000) > > to vim crashing when arguments are too long.
What commands and where does they crash? `range()` (i.e. `f_range()`) never receives such a lengthy integer, it will overflow earlier in eval7. So if range() function itself is buggy it will crash if you replace those long numbers with what they are converted to by eval7, otherwise eval7 (more likely, vim_str2nr) is buggy. > The same behavior can be observed when trying to accomplish a similar thing > with a for loop. > > :for i in range(2220500000,2220600000) | put=i | endfor > > Is it possible to validate the input to avoid this behavior? > > -- > -- > 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]. > For more options, visit https://groups.google.com/d/optout. -- -- 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]. For more options, visit https://groups.google.com/d/optout.
