[PATCH] hush: Check special names after export (ex. PS1)

Denys Vlasenko vda.linux at googlemail.com
Tue May 14 16:56:59 UTC 2019


On Mon, May 13, 2019 at 11:01 PM Catherine Garabedian
<catherine at kubos.co> wrote:
>
> Package: busybox
> Version: v1.30.1
> Severity: medium
>
> This patch (attached) causes the special hush variables (PS1, PS2, LINENO, etc) to be updated after an `export` command is performed.
>
> This fixes a bug where, when the PS1 variable is updated with `export PS1='# '`, the command line prompt becomes corrupted. This issue is because the pointer to the old PS1 string is freed, but the PS1 global variable isn't updated to contain the pointer to the new PS1 string.
> This issue was introduced in v1.29.0.
>
> Without this patch, the issue can be worked around by using `PS1='# '` to update the envar instead of `export PS1='# '`.
>
> I have run the tests in the 'testsuite' directory and no new errors were introduced.

Applied, thanks!


More information about the busybox mailing list