New submission from Trundle <andy-pyt...@hammerhartes.de>:

Snippet to reproduce:

import curses

scr = curses.initscr()
curses.ungetch(1025)
scr.getkey()

This is because `keyname()` in `PyCursesWindow_GetKey()` returns NULL
which is passed to `PyString_FromString()` then.

The attached patch fixes the segfault.

----------
components: Library (Lib)
files: python_curses_ungetch_getkey.patch
keywords: patch
messages: 89111
nosy: Trundle
severity: normal
status: open
title: getkey() can segfault in combination with curses.ungetch()
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file14234/python_curses_ungetch_getkey.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6243>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to