summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next
diff options
context:
space:
mode:
authorNir Soffer <nirsof@gmail.com>2017-07-09 10:42:35 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2017-07-09 10:42:35 (GMT)
commit68c3724651776f4ae90ed24d70cef6fd45bc7db5 (patch)
treed00cdf67b59965c9a65f04a34585293ea0ee5a44 /Misc/NEWS.d/next
parent3bbdf990a2c1b0b303b950058e3177a1bd5f697a (diff)
downloadcpython-68c3724651776f4ae90ed24d70cef6fd45bc7db5.zip
cpython-68c3724651776f4ae90ed24d70cef6fd45bc7db5.tar.gz
cpython-68c3724651776f4ae90ed24d70cef6fd45bc7db5.tar.bz2
[3.5] 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')
-rw-r--r--Misc/NEWS.d/next/Library/2017-07-07-02-18-57.bpo-29854.J8wKb_.rst2
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.