Sören Tempel
fa52ac9781
ash: don't read past end of var in subvareval for bash substitutions
...
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 <soeren@soeren-tempel.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-03-01 08:47:43 +01:00
..
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2018-04-11 12:39:18 +02:00
2018-04-11 12:39:18 +02:00
2021-09-07 18:16:45 +02:00
2017-07-26 00:30:02 +02:00
2021-09-07 18:16:45 +02:00
2017-07-25 14:55:05 +02:00
2021-09-07 18:16:45 +02:00
2018-01-13 19:28:19 +01:00
2021-09-07 18:16:45 +02:00
2019-05-19 16:35:56 +02:00
2021-09-07 18:16:45 +02:00
2017-07-25 15:18:57 +02:00
2017-07-26 00:07:27 +02:00
2017-07-26 00:07:27 +02:00
2016-10-26 15:56:53 +02:00
2016-10-26 15:56:53 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2017-07-25 16:29:36 +02:00
2017-07-21 13:37:25 +02:00
2017-07-21 13:37:25 +02:00
2017-07-21 13:37:25 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2017-07-25 16:29:36 +02:00
2017-07-25 16:29:36 +02:00
2016-10-02 18:17:15 +02:00
2016-10-02 18:17:15 +02:00
2016-10-02 18:17:15 +02:00
2016-10-02 18:17:15 +02:00
2015-04-18 19:36:38 +02:00
2015-04-18 19:36:38 +02:00
2016-10-02 18:17:15 +02:00
2016-10-02 18:17:15 +02:00
2016-10-02 18:17:15 +02:00
2016-10-02 18:17:15 +02:00
2021-09-07 18:16:45 +02:00
2021-07-25 22:03:16 +02:00
2020-02-17 10:15:35 +01:00
2020-02-17 10:15:35 +01:00
2016-07-25 03:56:00 +02:00
2017-07-06 19:50:42 +02:00
2017-07-17 17:49:11 +02:00
2017-07-17 17:49:11 +02:00
2018-04-02 13:15:37 +02:00
2010-09-05 14:47:58 +02:00
2018-04-02 13:15:37 +02:00
2016-10-02 18:08:04 +02:00
2016-10-02 18:08:04 +02:00
2016-10-02 18:08:04 +02:00
2018-04-02 13:15:37 +02:00
2018-04-02 13:15:37 +02:00
2018-04-02 13:15:37 +02:00
2018-04-02 13:15:37 +02:00
2018-08-04 22:25:28 +02:00
2018-08-04 22:25:28 +02:00
2018-01-25 14:09:06 +01:00
2018-01-25 14:09:06 +01:00
2021-01-09 08:46:54 +01:00
2021-01-09 08:27:37 +01:00
2022-03-01 08:47:43 +01:00
2022-03-01 08:47:43 +01:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2018-08-05 11:14:11 +02:00
2018-08-05 11:14:11 +02:00
2016-10-03 00:06:55 +02:00
2016-10-03 00:06:55 +02:00
2018-03-31 20:31:13 +02:00
2018-03-31 20:31:13 +02:00
2021-09-07 18:01:49 +02:00
2021-09-07 18:01:49 +02:00
2021-09-07 18:16:45 +02:00
2021-09-07 18:16:45 +02:00
2021-07-25 22:03:16 +02:00
2021-07-25 22:03:16 +02:00
2021-07-25 22:03:16 +02:00
2021-07-25 22:03:16 +02:00
2016-10-02 18:08:04 +02:00
2016-10-02 18:08:04 +02:00
2016-09-29 16:59:06 +02:00
2016-09-29 16:59:06 +02:00
2016-09-29 16:59:06 +02:00
2016-09-29 16:59:06 +02:00
2016-09-29 17:58:58 +02:00
2016-09-29 20:02:53 +02:00
2016-09-29 16:59:06 +02:00
2016-09-29 16:59:06 +02:00
2016-10-02 02:46:56 +02:00
2016-10-02 02:46:56 +02:00
2016-10-01 20:55:02 +02:00
2016-10-01 20:55:02 +02:00
2016-10-01 20:55:02 +02:00
2016-10-01 20:55:02 +02:00
2018-04-11 16:02:58 +02:00
2018-04-11 16:02:58 +02:00
2018-08-05 14:29:58 +02:00
2018-08-05 14:29:58 +02:00
2015-05-18 09:56:16 +02:00
2015-05-18 09:56:16 +02:00
2015-05-18 09:53:26 +02:00
2015-05-18 09:53:26 +02:00
2015-05-18 09:57:51 +02:00
2015-05-18 09:57:51 +02:00
2015-05-18 09:51:35 +02:00
2015-05-18 09:51:35 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 10:13:21 +02:00
2015-05-18 09:57:51 +02:00
2015-05-18 09:57:51 +02:00
2016-03-22 18:19:29 -04:00
2017-07-06 19:29:23 +02:00