- Issue #23441: rcompleter now prints a tab character instead of displaying
possible completions for an empty word. Initial patch by Martin Sekera.
+- Issue #24735: Fix invalid memory access in
+ itertools.combinations_with_replacement().
+
- Issue #17527: Add PATCH to wsgiref.validator. Patch from Luca Sbardella.
- Issue #24683: Fixed crashes in _json functions called with arguments of
if (result == NULL)
goto empty;
co->result = result;
- elem = PyTuple_GET_ITEM(pool, 0);
- for (i=0; i<r ; i++) {
- assert(indices[i] == 0);
- Py_INCREF(elem);
- PyTuple_SET_ITEM(result, i, elem);
+ if (n > 0) {
+ elem = PyTuple_GET_ITEM(pool, 0);
+ for (i=0; i<r ; i++) {
+ assert(indices[i] == 0);
+ Py_INCREF(elem);
+ PyTuple_SET_ITEM(result, i, elem);
+ }
}
} else {
/* Copy the previous result tuple or re-use it if available */