diff options
author | Nir Soffer <nirsof@gmail.com> | 2017-07-07 06:10:46 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2017-07-07 06:10:46 (GMT) |
commit | fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b (patch) | |
tree | e94fb9176f0309f41cb51fa3f16ba616d94d7ebd /Misc/NEWS.d/next/Library | |
parent | 25a4206c243e3b1fa6f5b1c72a11b409b007694d (diff) | |
download | cpython-fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b.zip cpython-fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b.tar.gz cpython-fae8f4a9cb88a68eb14750cbb8ddf8740fd67b8b.tar.bz2 |
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.
Diffstat (limited to 'Misc/NEWS.d/next/Library')
-rw-r--r-- | Misc/NEWS.d/next/Library/2017-07-07-02-18-57.bpo-29854.J8wKb_.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2017-07-07-02-18-57.bpo-29854.J8wKb_.rst b/Misc/NEWS.d/next/Library/2017-07-07-02-18-57.bpo-29854.J8wKb_.rst new file mode 100644 index 0000000..5c43908 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2017-07-07-02-18-57.bpo-29854.J8wKb_.rst @@ -0,0 +1,2 @@ +Fix segfault in readline when using readline's history-size option. Patch +by Nir Soffer. |