Bug 6390 - newt segfaults with empty listboxes
newt segfaults with empty listboxes
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: newt (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Matt Wilson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-26 14:10 EDT by Nalin Dahyabhai
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-12-20 19:34:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Nalin Dahyabhai 1999-10-26 14:10:22 EDT
I'm working on a simple program that allows the user to
populate an initially-empty listbox.  If the user presses
an alpha key, newt segfaults at listbox.c:636 because
item == NULL.

Change:
if (item->text && (toupper(*item->text) ==
toupper(ev.u.key))) {
to:
if (item && item->text && (toupper(*item->text) ==
toupper(ev.u.key))) {

...and it goes away.

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