summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston2021-04-25 11:55:01 +0100
committerDenys Vlasenko2021-04-28 11:29:33 +0200
commit852ffbee341ccbcdb6400ad5cb4688b410e236b5 (patch)
tree387aaa90dcebd1b66b4b79eae1a1b99905f09b74 /shell
parentdadd90974639c0b8cb0561eb946746ca2678b5fb (diff)
downloadbusybox-852ffbee341ccbcdb6400ad5cb4688b410e236b5.zip
busybox-852ffbee341ccbcdb6400ad5cb4688b410e236b5.tar.gz
vi: fix buffer overrun; code shrink
It was possible for get_input_line() to store its NUL terminator one character beyond the end of its buffer. Code shrink in colon(): - Certain colon commands can be matched exactly, as any shorter string would be matched earlier, e.g. ':wq' versus ':write'. - Command matching is now case sensitive so there's no need to check for 'N' or 'Q' suffixes. - Rewrite how commands and arguments are split. function old new delta colon 3848 3751 -97 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-97) Total: -97 bytes Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
0 files changed, 0 insertions, 0 deletions