diff options
author | Ron Yorston | 2021-03-30 13:02:32 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-03-30 14:51:27 +0200 |
commit | 24198f652f10dca5603df7c704263358ca21f5ce (patch) | |
tree | e0f20f1a1b1930d7130e68ea6bd0ea547733f95c /editors/sed1line.txt | |
parent | a25b4c2c4245083411011e5054ba859d7c6b8dd6 (diff) | |
download | busybox-24198f652f10dca5603df7c704263358ca21f5ce.zip busybox-24198f652f10dca5603df7c704263358ca21f5ce.tar.gz |
vi: deal with invalid movements in shift commands
Since commit 25d259264 (vi: make buffer handling more vi-like)
find_range() can return early when an invalid movement is
specified.
The call to find_range() in the code that handles shift commands
('<' and '>') doesn't check for this condition. Previously this
only resulted in the current line being shifted but it can now
result in a segfault.
Check for an invalid movement and notify the user without taking
any further action.
function old new delta
do_cmd 4890 4898 +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 8/0) Total: 8 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors/sed1line.txt')
0 files changed, 0 insertions, 0 deletions