Bug 752818 - whiptail --inputbox (and other string-returning commands) broken
whiptail --inputbox (and other string-returning commands) broken
Product: Fedora
Classification: Fedora
Component: newt (Show other bugs)
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-11-10 09:03 EST by Alexey Feldgendler
Modified: 2011-11-17 18:42 EST (History)
1 user (show)

See Also:
Fixed In Version: newt-0.52.14-1.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-11-17 18:42:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Proposed fix (5.36 KB, patch)
2011-11-10 09:09 EST, Alexey Feldgendler
no flags Details | Diff

  None (edit)
Description Alexey Feldgendler 2011-11-10 09:03:09 EST
Description of problem:

whiptail --inputbox ...writes garbage or nothing at all on stderr.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. whiptail --inputbox "prompt" 10 20
2. Type "foobar" and press Enter.
Actual results:
Garbage or nothing is printed on stderr.

Expected results:
"foobar" is printed on stderr.
Comment 1 Alexey Feldgendler 2011-11-10 09:06:07 EST
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.
Comment 2 Alexey Feldgendler 2011-11-10 09:09:26 EST
Created attachment 532850 [details]
Proposed fix

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.
Comment 3 Miroslav Lichvar 2011-11-10 10:17:15 EST
I've pushed the patch with some corrections to upstream git. Thanks!
Comment 4 Fedora Update System 2011-11-11 06:19:36 EST
newt-0.52.14-1.fc16 has been submitted as an update for Fedora 16.
Comment 5 Fedora Update System 2011-11-11 22:28:31 EST
Package newt-0.52.14-1.fc16:
* 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).
Comment 6 Alexey Feldgendler 2011-11-14 07:37:37 EST
Thanks Miroslav! That was quick.
Comment 7 Fedora Update System 2011-11-17 18:42:44 EST
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.

Note You need to log in before you can comment on or make changes to this bug.