Red Hat Bugzilla – Bug 752818
whiptail --inputbox (and other string-returning commands) broken
Last modified: 2011-11-17 18:42:44 EST
Description of problem:
whiptail --inputbox ...writes garbage or nothing at all on stderr.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. whiptail --inputbox "prompt" 10 20
2. Type "foobar" and press Enter.
Garbage or nothing is printed on stderr.
"foobar" is printed on stderr.
The bug was introduced in commit 3341bdc52b116d40cd20f21f7f7d8b7cc7977fd5 and affects also --passwordbox, --menu, --checklist and --radiolist. The reason is that newtFormDestroy apparently frees the resulting string as part of tearing down the form.
Created attachment 532850 [details]
My proposed fix (see attached patch) calls strdup for the strings returned from inputBox, listBox and checkList. It also adds freeing of these strings in whiptail.c and eliminates unnecessary strdup calls in whiptcl.c.
I've pushed the patch with some corrections to upstream git. Thanks!
newt-0.52.14-1.fc16 has been submitted as an update for Fedora 16.
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing newt-0.52.14-1.fc16'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Thanks Miroslav! That was quick.
newt-0.52.14-1.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.