mirror of
https://github.com/vim/vim.git
synced 2025-10-22 08:34:29 -04:00
patch 9.0.1482: crash when textprop has a very large "padding" value
Problem: Crash when textprop has a very large "padding" value. (Yegappan Lakshmanan) Solution: Avoid the "after" count to go negative.
This commit is contained in:
@@ -665,6 +665,12 @@ text_prop_position(
|
||||
{
|
||||
before = 0;
|
||||
after = wp->w_width - cells - win_col_off(wp) - padding;
|
||||
if (after < 0)
|
||||
{
|
||||
// text "above" has too much padding to fit
|
||||
padding += after;
|
||||
after = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user