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.
N
Nir Soffer committed
fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b
Parent: 25a4206
Committed by Berker Peksag <berker.peksag@gmail.com>
on 7/7/2017, 6:10:46 AM