[Python-checkins] [python/cpython] fae8f4: bpo-29854: Fix segfault in call_readline() (GH-728...

GitHub noreply at github.com
Fri Jul 7 02:10:47 EDT 2017


 Branch: refs/heads/master
 Home: https://github.com/python/cpython
 Commit: fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b
 https://github.com/python/cpython/commit/fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b
 Author: Nir Soffer <nirsof at gmail.com>
 Date: 2017年07月07日 (2017年7月07日)
 Changed paths:
 M Lib/test/test_readline.py
 A Misc/NEWS.d/next/Library/2017-07-07-02-18-57.bpo-29854.J8wKb_.rst
 M Modules/readline.c
 Log Message:
 -----------
 bpo-29854: Fix segfault in call_readline() (GH-728)
If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.
It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.
This issue affects only GNU readline. When using libedit emulation
system history size option does not work.


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /