forked from aniani/vim
patch 8.2.3659: integer overflow with large line number
Problem: Integer overflow with large line number. Solution: Check for overflow. (closes #9202)
This commit is contained in:
@@ -655,4 +655,16 @@ func Test_not_break_expression_register()
|
||||
call assert_equal('1+1', getreg('=', 1))
|
||||
endfunc
|
||||
|
||||
func Test_address_line_overflow()
|
||||
if v:sizeoflong < 8
|
||||
throw 'Skipped: only works with 64 bit long ints'
|
||||
endif
|
||||
new
|
||||
call setline(1, 'text')
|
||||
call assert_fails('|.44444444444444444444444', 'E1247:')
|
||||
call assert_fails('|.9223372036854775806', 'E1247:')
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
|
||||
" vim: shiftwidth=2 sts=2 expandtab
|
||||
|
||||
Reference in New Issue
Block a user