summaryrefslogtreecommitdiff
path: root/editors/sed1line.txt
diff options
context:
space:
mode:
authorRon Yorston2021-03-30 13:02:32 +0100
committerDenys Vlasenko2021-03-30 14:51:27 +0200
commit24198f652f10dca5603df7c704263358ca21f5ce (patch)
treee0f20f1a1b1930d7130e68ea6bd0ea547733f95c /editors/sed1line.txt
parenta25b4c2c4245083411011e5054ba859d7c6b8dd6 (diff)
downloadbusybox-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