SEGV upon deleting multiple bottom lines in vi
Ron Yorston
rmy at pobox.com
Fri Nov 30 17:39:44 UTC 2018
Michał Berger wrote:
>However, I haven't been able to determine if there are any side effects
>of applying it yet (or even fully understan why that length-- happens
>there at all), so take it with a grain of salt (it's not a proper fix
>for sure). :D
One side effect of the patch is that if you delete the only line in a
file and then undo the deletion an extra line is added. That's why the
length was being decremented. However, as the comment says, it should
only be decremented if the text buffer becomes empty. The test for
this condition is wrong.
A different (and possibly better) patch follows.
Ron
More information about the busybox
mailing list