<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/shell/ash_test/ash-vars, branch cron_changes</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=cron_changes</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=cron_changes'/>
<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>shells: fix a typo in var_backslash1.tests, expand it while at it</title>
<updated>2025-08-09T11:00:55+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2025-08-09T11:00:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=c92755133b310461171cd6050237caba6dce1264'/>
<id>urn:sha1:c92755133b310461171cd6050237caba6dce1264</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>shells: add testsuite item</title>
<updated>2025-08-08T23:48:12+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2025-08-08T23:48:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=fa82ef1a2ec558bb8e624461851a0d1fcbc0a0b6'/>
<id>urn:sha1:fa82ef1a2ec558bb8e624461851a0d1fcbc0a0b6</id>
<content type='text'>
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>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>ash: match bash behavior for ${empty_var/*/repl}</title>
<updated>2021-01-09T07:46:54+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-01-09T07:46:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=2b7c1aa92c68524559a2067609d09309d5c09adc'/>
<id>urn:sha1:2b7c1aa92c68524559a2067609d09309d5c09adc</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>ash: fix ${unset_var/pattern/repl}</title>
<updated>2021-01-09T07:27:37+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2021-01-09T07:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=883cdb79a440d0425766f67aaef0cabde0a5060e'/>
<id>urn:sha1:883cdb79a440d0425766f67aaef0cabde0a5060e</id>
<content type='text'>
function                                             old     new   delta
subevalvar                                          1349    1353      +4

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>
