<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/hush_test/hush-vars, branch zstd</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=zstd</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=zstd'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2025-08-11T15:36:02+00:00</updated>
<entry>
<title>hush: fix var_backslash1.tests</title>
<updated>2025-08-11T15:36:02+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2025-08-11T15:31:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=0da6c813e13eaf1cddfd7cbee1f3a5a4ffe58ec0'/>
<id>urn:sha1:0da6c813e13eaf1cddfd7cbee1f3a5a4ffe58ec0</id>
<content type='text'>
function                                             old     new   delta
o_addqblock                                            -     131    +131
append_str_maybe_ifs_split                            53     100     +47
expand_one_var                                      1872    1897     +25
encode_then_expand_vararg                            380     399     +19
sig_unblock                                           41      43      +2
sig_block                                             41      40      -1
sigprocmask_allsigs                                   33      31      -2
expand_vars_to_list                                 1080    1077      -3
wait_for_child_or_signal                             202     193      -9
o_addQstr                                            175      42    -133
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/5 up/down: 224/-148)           Total: 76 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: disable check for "good" function name, bash does not check this</title>
<updated>2023-07-04T12:38:25+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-07-04T12:35:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=07a95cfcabb0706a22599b4440b495b6cfa8123e'/>
<id>urn:sha1:07a95cfcabb0706a22599b4440b495b6cfa8123e</id>
<content type='text'>
function                                             old     new   delta
.rodata                                           105304  105261     -43
parse_command                                       1696    1633     -63
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-106)           Total: -106 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: don't read past end of var in subvareval for bash substitutions</title>
<updated>2022-03-01T07:47:43+00:00</updated>
<author>
<name>Sören Tempel</name>
<email>soeren@soeren-tempel.net</email>
</author>
<published>2022-02-28T07:36:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=fa52ac9781f479de8ab4d8526276244c0a0471f4'/>
<id>urn:sha1:fa52ac9781f479de8ab4d8526276244c0a0471f4</id>
<content type='text'>
Without this patch, BusyBox handles bash pattern substitutions without
a terminating '/' character incorrectly.

Consider the following shell script:

	_bootstrapver=5.0.211-r0
	_referencesdir="/usr/${_bootstrapver/-*}/Sources"
	echo $_referencesdir

This should output `/usr/5.0.211/Sources`. However, without this patch
it instead outputs `/usr/5.0.211Sources`. This is due to the fact that
BusyBox expects the bash pattern substitutions to always be terminated
with a '/' (at least in this part of subvareval) and thus reads passed
the substitution itself and consumes the '/' character which is part of
the literal string. If there is no '/' after the substitution then
BusyBox might perform an out-of-bounds read under certain circumstances.

When replacing the bash pattern substitution with `${_bootstrapver/-*/}`,
or with this patch applied, ash outputs the correct value.

Signed-off-by: Sören Tempel &lt;soeren@soeren-tempel.net&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: LINENO starts from 0 in -c SCRIPT mode</title>
<updated>2021-09-07T16:16:45+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-09-07T16:16:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=64aa86b720641cb50be9636e6c20d4dbbea6fed0'/>
<id>urn:sha1:64aa86b720641cb50be9636e6c20d4dbbea6fed0</id>
<content type='text'>
The var_LINENO3.tests fails for hush: it does start from 0, but does not increment.

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: fix LINENO in functions</title>
<updated>2021-09-07T16:01:49+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-09-07T16:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d6c9cbc0727cc3875672ae280ec129514a9d8594'/>
<id>urn:sha1:d6c9cbc0727cc3875672ae280ec129514a9d8594</id>
<content type='text'>
From larger patch by Roberto A. Foglietta &lt;roberto.foglietta@gmail.com&gt;

function                                             old     new   delta
evalfun                                              348     369     +21
ash_main                                            1202    1218     +16
setinputstring                                        65      73      +8
lookupvar                                            116     106     -10
evaltree                                             772     753     -19
evalsubshell                                         192     173     -19
evalfor                                              175     156     -19
evalcase                                             273     254     -19
evalcommand                                         1560    1536     -24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/6 up/down: 45/-110)           Total: -65 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: implement $'str' bashism</title>
<updated>2021-07-26T13:32:46+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-07-26T13:29:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b278d82c61ab5125b5c7e350b264c1f3d52d682b'/>
<id>urn:sha1:b278d82c61ab5125b5c7e350b264c1f3d52d682b</id>
<content type='text'>
function                                             old     new   delta
parse_dollar_squote                                    -     441    +441
encode_then_expand_vararg                            359     380     +21
parse_stream                                        2252    2271     +19
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 481/0)             Total: 481 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ahell: update testsuite</title>
<updated>2021-07-25T20:03:16+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-07-25T20:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=05c5d745f7b14e265144489b7809a3d6dbbadec6'/>
<id>urn:sha1:05c5d745f7b14e265144489b7809a3d6dbbadec6</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix bkslash+newline handling and number validation in ${NN} and ${#NN}</title>
<updated>2021-06-19T13:45:45+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-06-19T13:28:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=97c3b5e3ff252b3399d10835d5c906886a7499f4'/>
<id>urn:sha1:97c3b5e3ff252b3399d10835d5c906886a7499f4</id>
<content type='text'>
Entering "${1a}" into interactive shell was making it exit.

function                                             old     new   delta
parse_dollar                                         824     958    +134
i_getch_and_eat_bkslash_nl                             -      44     +44
parse_expr                                           917     938     +21
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 199/0)             Total: 199 bytes

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>hush: fix fallout from tweaking ${var:START:LEN} code</title>
<updated>2020-12-23T11:38:03+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-12-23T11:38:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a7b52d26c435c35336ddc5ff93d5680e648345c8'/>
<id>urn:sha1:a7b52d26c435c35336ddc5ff93d5680e648345c8</id>
<content type='text'>
function                                             old     new   delta
expand_one_var                                      2344    2353      +9

Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: parser: Only accept single-digit parameter expansion outside of braces</title>
<updated>2020-02-17T09:15:35+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2020-02-17T09:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c2ce888030b6b880b3229520a8ff7d7026248a9a'/>
<id>urn:sha1:c2ce888030b6b880b3229520a8ff7d7026248a9a</id>
<content type='text'>
Upstream commit:

    Date: Mon, 27 May 2019 13:39:37 +0800
    parser: Only accept single-digit parameter expansion outside of braces

    This patch should fix the problem.

    Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;

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