On Wed, Dec 5, 2018 at 7:46 PM Bram Moolenaar <[email protected]> wrote:
>
>
> Patch 8.1.0565
> Problem:    Asan complains about reading before allocated block.
> Solution:   Workaround: Avoid offset from becoming negative.
> Files:      src/gui.c
[...]
> !           // FIXME: how can the first character ever be zero?
> !           if (col1 > 0 && ScreenLines[off + col1] == 0)
>                 --col1;
[...]

Experiment shows that after yanking a block from an empty buffer (i.e.
the ruler says "0,0-1") with 'virtualedit' defaulted to empty, the
register yanked to is empty. Doesn't that mean that the
string-terminating null byte is found at character zero of the block?

Of course, one would normally not yank from an empty buffer — except,
maybe, to test that the program logic is working properly, even in the
most absurd circumstances.

Best regards,
Tony.

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

Raspunde prin e-mail lui