Bug 707344

Summary: Flash() segfaults
Product: [Fedora] Fedora Reporter: r3obh <Robert.Harley>
Component: ncursesAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 14CC: dickey, mlichvar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-30 06:16:15 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description r3obh 2011-05-24 14:40:56 EDT
Description of problem:

$ cat foo.c && gcc foo.c -lcurses && ./a.out
#include <curses.h>

int main() {
  return 0;
Segmentation fault (core dumped)

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


How reproducible:

Comment 1 Thomas E. Dickey 2011-05-25 18:47:11 EDT
I can make it not dump core, but it won't flash since
curses is not initialized (man initscr, newterm).
Comment 2 Miroslav Lichvar 2011-05-26 06:40:10 EDT
I get the crash, with ncurses-5.9 the backtrace is:

70	    if (flash_screen) {
(gdb) bt
#0  0x00007ffff7bc13d1 in flash () at ../../ncurses/base/lib_flash.c:70
Comment 3 Thomas E. Dickey 2011-05-26 17:46:21 EDT
yes - but my point was that while I can modify ncurses to
avoid the core dump, the program will never function as
the reporter intended.  (I've made fixes of this sort before).
Comment 4 r3obh 2011-05-26 20:30:50 EDT
The doc says that on failure, the function does nothing and returns ERR.
Comment 5 Miroslav Lichvar 2011-05-30 06:16:15 EDT
This seems to be fixed in upstream patch 5.9-20110528. Thanks.
Comment 6 Thomas E. Dickey 2011-05-30 10:01:36 EDT
no problem.