<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/editors, branch tab_completion2</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=tab_completion2</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=tab_completion2'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2023-01-05T15:21:48+00:00</updated>
<entry>
<title>ed: don't use memcpy with overlapping memory regions</title>
<updated>2023-01-05T15:21:48+00:00</updated>
<author>
<name>Sören Tempel</name>
<email>soeren+git@soeren-tempel.net</email>
</author>
<published>2022-02-08T19:29:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=ca96022d6edaaf619324db5a481698231d74d1df'/>
<id>urn:sha1:ca96022d6edaaf619324db5a481698231d74d1df</id>
<content type='text'>
The memcpy invocations in the subCommand function, modified by this
commit, previously used memcpy with overlapping memory regions. This is
undefined behavior. On Alpine Linux, it causes BusyBox ed to crash since
we compile BusyBox with -D_FORTIFY_SOURCE=2 and our fortify-headers
implementation catches this source of undefined behavior [0]. The issue
can only be triggered if the replacement string is the same size or
shorter than the old string.

Looking at the code, it seems to me that a memmove(3) is what was
actually intended here, this commit modifies the code accordingly.

[0]: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13504

Signed-off-by: Sören Tempel &lt;soeren+git@soeren-tempel.net&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>sed: fix double-free in FEATURE_CLEAN_UP=y configs</title>
<updated>2023-01-02T16:05:55+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-01-02T16:05:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=9b2d766e0ecb222d25a43333287835452e43f8a9'/>
<id>urn:sha1:9b2d766e0ecb222d25a43333287835452e43f8a9</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>*: style fix</title>
<updated>2022-08-30T14:41:17+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2022-08-30T14:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=fe73c8d55795a8fe7e95fc2c00af6899817b96b8'/>
<id>urn:sha1:fe73c8d55795a8fe7e95fc2c00af6899817b96b8</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>vi: add 'ZQ' quitting command</title>
<updated>2022-08-02T13:05:12+00:00</updated>
<author>
<name>Grob Grobmann</name>
<email>grobgrobmann@gmail.com</email>
</author>
<published>2022-06-08T19:51:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=3147552a230cfd4a4943a46f63e3313655acf566'/>
<id>urn:sha1:3147552a230cfd4a4943a46f63e3313655acf566</id>
<content type='text'>
Busybox vi provides the 'ZZ' command to save and close
the similar 'ZQ' command just exits without saving.

function                                             old     new   delta
do_cmd                                              4222    4244     +22

Signed-off-by: Grob Grobmann &lt;grobgrobmann@gmail.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>awk: fix use after free (CVE-2022-30065)</title>
<updated>2022-07-11T15:18:07+00:00</updated>
<author>
<name>Natanael Copa</name>
<email>ncopa@alpinelinux.org</email>
</author>
<published>2022-06-17T15:45:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=e63d7cdfdac78c6fd27e9e63150335767592b85e'/>
<id>urn:sha1:e63d7cdfdac78c6fd27e9e63150335767592b85e</id>
<content type='text'>
fixes https://bugs.busybox.net/show_bug.cgi?id=14781

function                                             old     new   delta
evaluate                                            3343    3357     +14

Signed-off-by: Natanael Copa &lt;ncopa@alpinelinux.org&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>vi: handle autoindent in 'cc' command</title>
<updated>2022-06-26T17:38:31+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-03-18T11:30:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=2617a5e4c600b4577b2c18f794701276e55da43b'/>
<id>urn:sha1:2617a5e4c600b4577b2c18f794701276e55da43b</id>
<content type='text'>
When the 'cc' command is invoked with autoindent enabled it
should use the indent of the first line being changed.

The size of the indent has to be established before char_insert()
is called as the lines being changed are deleted.  Introduce a
new global variable, newindent, to handle this.  The indentcol
global is now effectively a static variable in char_insert().

function                                             old     new   delta
do_cmd                                              4247    4308     +61
vi_main                                              416     422      +6
char_insert                                          891     875     -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 67/-16)             Total: 51 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>vi: fix regression in autoindent handling</title>
<updated>2022-06-26T17:38:28+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-03-18T11:29:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=af3b585815de5af367995d6064d994394b46c928'/>
<id>urn:sha1:af3b585815de5af367995d6064d994394b46c928</id>
<content type='text'>
Suppose autoindent is enabled and we have a line with an initial
tab where we want to split the words onto separate lines:

	split the words

One way to do this is with the sequence 'f r&lt;CR&gt;;r&lt;CR&gt;', but in
BusyBox vi the result is:

	split

	he
words

This is a regression introduced by commit 9659a8db1 (vi: remove
autoindent from otherwise empty lines).  The amount of indentation
is being recorded when the 'r' command inserts a newline but
isn't subsequently reset.  A fix is to only record the indent
when in insert or replace mode.  Proper handling of the 'o' and
'O' commands then requires them to switch to insert mode before
calling char_insert() to insert a newline.

function                                             old     new   delta
char_insert                                          884     891      +7
do_cmd                                              4243    4247      +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 11/0)               Total: 11 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>vi: fix backspace over tab in commands</title>
<updated>2022-04-20T14:06:04+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-04-20T08:23:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c93eb1a95b1f06c145d4169a8776a318a2085e8b'/>
<id>urn:sha1:c93eb1a95b1f06c145d4169a8776a318a2085e8b</id>
<content type='text'>
Colon and search commands are entered on the status line.  Since
the cursor position wasn't being tracked backspacing over a tab
resulted in a mismatch between the actual and apparent content
of the command.

function                                             old     new   delta
get_input_line                                       178     180      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 2/0)                 Total: 2 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Bernhard Reutner-Fischer &lt;rep.dot.nop@gmail.com&gt;
</content>
</entry>
<entry>
<title>vi: improved handling of backspace in replace mode</title>
<updated>2022-03-04T21:57:05+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-03-03T11:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=fc7868602ecf0d761a9a877141add4a9b6918d02'/>
<id>urn:sha1:fc7868602ecf0d761a9a877141add4a9b6918d02</id>
<content type='text'>
In replace mode ('R' command) the backspace character should get
special treatment:

- backspace only goes back to the start of the replacement;
- backspacing over replaced characters restores the original text.

Prior to this commit BusyBox vi deleted the characters both before
and after the cursor in replace mode.

function                                             old     new   delta
undo_pop                                               -     235    +235
char_insert                                          858     884     +26
indicate_error                                        81      84      +3
find_range                                           654     657      +3
static.text_yank                                      77      79      +2
do_cmd                                              4486    4243    -243
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/1 up/down: 269/-243)           Total: 26 bytes

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Add support for long options to cmp</title>
<updated>2022-01-23T19:24:32+00:00</updated>
<author>
<name>Walter Lozano</name>
<email>walter.lozano@collabora.com</email>
</author>
<published>2022-01-21T14:00:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=6dd6a6c42d1465d8cca2539476f6bffd5e1353dd'/>
<id>urn:sha1:6dd6a6c42d1465d8cca2539476f6bffd5e1353dd</id>
<content type='text'>
In order to improve compatibility with GNU cmp add support for long
options to busybox cmp.

function                                             old     new   delta
static.cmp_longopts                                    -      36     +36
cmp_main                                             589     594      +5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 41/0)               Total: 41 bytes

Signed-off-by: Walter Lozano &lt;walter.lozano@collabora.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
