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

Catherine Garabedian catherine at kubos.co
Mon May 13 21:01:25 UTC 2019


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.

~ Catherine Garabedian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190513/b4baf0ec/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-hush-Check-special-names-after-export.patch
Type: application/octet-stream
Size: 1170 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20190513/b4baf0ec/attachment.obj>


More information about the busybox mailing list