diff options
author | Ron Yorston | 2021-04-25 11:55:01 +0100 |
---|---|---|
committer | Denys Vlasenko | 2021-04-28 11:29:33 +0200 |
commit | 852ffbee341ccbcdb6400ad5cb4688b410e236b5 (patch) | |
tree | 387aaa90dcebd1b66b4b79eae1a1b99905f09b74 /shell/ash_test/ash-z_slow | |
parent | dadd90974639c0b8cb0561eb946746ca2678b5fb (diff) | |
download | busybox-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/ash_test/ash-z_slow')
0 files changed, 0 insertions, 0 deletions