[ python-Bugs-1548092 ] curses module segfaults on invalid tparm arguments
SourceForge.net
noreply at sourceforge.net
Mon Aug 28 19:47:50 CEST 2006
Bugs item #1548092, was opened at 2006-08-28 19:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1548092&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Marien Zwart (marienz)
Assigned to: Nobody/Anonymous (nobody)
Summary: curses module segfaults on invalid tparm arguments
Initial Comment:
At least on my platform the ncurses "tparm" function
returns NULL on certain invalid arguments.
PyCurses_tparm does not check the return value, it just
passes it to PyString_FromString. This means:
python -c "import curses;curses.setupterm();print
curses.tparm('', curses.COLOR_GREEN)"
gives me:
zsh: segmentation fault python -c
(tested with python 2.4.3)
I am not sure what the best fix is. An exception would
make sense to me, but the (related) tigetstr function
returns None to python if the wrapped c function
returns NULL, and I have not used the curses module
enough to know what is more common.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1548092&group_id=5470
More information about the Python-bugs-list
mailing list