is provided.
+Extension Modules
+-----------------
+
+- Patch #1093585: raise a ValueError for negative history items in readline.
+ {remove_history,replace_history}
+
+
Library
-------
- Bug #1083110: ``zlib.decompress.flush()`` would segfault if called immediately
after creating the object, without any intervening ``.decompress()`` calls.
-
Build
-----
if (!PyArg_ParseTuple(args, "i:remove_history", &entry_number))
return NULL;
+ if (entry_number < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "History index cannot be negative");
+ return NULL;
+ }
entry = remove_history(entry_number);
if (!entry) {
PyErr_Format(PyExc_ValueError,
if (!PyArg_ParseTuple(args, "is:replace_history", &entry_number, &line)) {
return NULL;
}
+ if (entry_number < 0) {
+ PyErr_SetString(PyExc_ValueError,
+ "History index cannot be negative");
+ return NULL;
+ }
old_entry = replace_history_entry(entry_number, line, (void *)NULL);
if (!old_entry) {
PyErr_Format(PyExc_ValueError,