[patch] fixed 2 bugs with 'colorcolum'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[patch] fixed 2 bugs with 'colorcolum'

Dominique Pellé
Hi

Attached patch fixes 2 issues when setting up option 'colorcolumn'
in Vim-7.3a (2319:966a5609669e):

1/ trailing comma as in ":set cc=80,"  was not recognized as an error
2/ access to illegal memory when doing:

    $ valgrind vim -u NONE -c 'set cc=-1' 2> vg.log

    ==6060== Invalid read of size 1
    ==6060==    at 0x50B2FE: check_colorcolumn (option.c:6959)
    ==6060==    by 0x508CB1: did_set_string_option (option.c:5656)
    ==6060==    by 0x507400: do_set (option.c:4771)
    ==6060==    by 0x4771E0: ex_set (ex_docmd.c:11087)
    ==6060==    by 0x4690ED: do_one_cmd (ex_docmd.c:2646)
    ==6060==    by 0x466764: do_cmdline (ex_docmd.c:1114)
    ==6060==    by 0x465F19: do_cmdline_cmd (ex_docmd.c:720)
    ==6060==    by 0x4AC9C8: exe_commands (main.c:2798)
    ==6060==    by 0x4A9FB0: main (main.c:884)
    ==6060==  Address 0xb46c5a3 is 0 bytes after a block of size 3 alloc'd
    ==6060==    at 0x4C241C3: malloc (vg_replace_malloc.c:195)
    ==6060==    by 0x4D8AA2: lalloc (misc2.c:919)
    ==6060==    by 0x4D89AF: alloc (misc2.c:818)
    ==6060==    by 0x506E38: do_set (option.c:4603)
    ==6060==    by 0x4771E0: ex_set (ex_docmd.c:11087)
    ==6060==    by 0x4690ED: do_one_cmd (ex_docmd.c:2646)
    ==6060==    by 0x466764: do_cmdline (ex_docmd.c:1114)
    ==6060==    by 0x465F19: do_cmdline_cmd (ex_docmd.c:720)
    ==6060==    by 0x4AC9C8: exe_commands (main.c:2798)
    ==6060==    by 0x4A9FB0: main (main.c:884)

Regards
-- Dominique

--
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

fixed-cursorcolumn-7.3a.patch (1K) Download Attachment
Loading...