[Python-checkins] cpython (3.4): Issue #21868: Prevent turtle crash due to invalid undo buffer size.
raymond.hettinger
python-checkins at python.org
Mon Jul 21 06:31:44 CEST 2014
http://hg.python.org/cpython/rev/02b25ec13c94
changeset: 91740:02b25ec13c94
branch: 3.4
parent: 91737:a821cc06082b
user: Raymond Hettinger <python at rcn.com>
date: Sun Jul 20 21:30:32 2014 -0700
summary:
Issue #21868: Prevent turtle crash due to invalid undo buffer size.
files:
Lib/turtle.py | 2 +-
Misc/NEWS | 2 ++
2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/turtle.py b/Lib/turtle.py
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -2594,7 +2594,7 @@
Example (for a Turtle instance named turtle):
>>> turtle.setundobuffer(42)
"""
- if size is None:
+ if size is None or size <= 0:
self.undobuffer = None
else:
self.undobuffer = Tbuffer(size)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,6 +30,8 @@
- Issue #21044: tarfile.open() now handles fileobj with an integer 'name'
attribute. Based on patch by Martin Panter.
+- Issue #21867: Prevent turtle crash due to invalid undo buffer size.
+
- Issue #19076: Don't pass the redundant 'file' argument to self.error().
- Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list