diff options
author | Raymond Hettinger <python@rcn.com> | 2014-07-21 04:26:04 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2014-07-21 04:26:04 (GMT) |
commit | b606d45fb26d38ba00b06a4349fd05172ba9e12c (patch) | |
tree | 14a4b625b8f5f4b7830260a620bf869f6e5c8256 | |
parent | e2d1e64a1ffd04a274e911c53fd9ee00a4943f6c (diff) | |
download | cpython-b606d45fb26d38ba00b06a4349fd05172ba9e12c.zip cpython-b606d45fb26d38ba00b06a4349fd05172ba9e12c.tar.gz cpython-b606d45fb26d38ba00b06a4349fd05172ba9e12c.tar.bz2 |
Issue #21868: Prevent turtle crash due to invalid undo buffer size.
-rw-r--r-- | Lib/lib-tk/turtle.py | 2 | ||||
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/Lib/lib-tk/turtle.py b/Lib/lib-tk/turtle.py index 6a90715..75673a4 100644 --- a/Lib/lib-tk/turtle.py +++ b/Lib/lib-tk/turtle.py @@ -2499,7 +2499,7 @@ class RawTurtle(TPen, TNavigator): 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) @@ -235,6 +235,7 @@ Ingrid Cheung Albert Chin-A-Young Adal Chiriliuc Matt Chisholm +Lita Cho Anders Chrigström Tom Christiansen Renee Chu @@ -16,6 +16,9 @@ Library - Issue #22017: Correct reference counting errror in the initialization of the _warnings module. +- Issue #21868: Prevent turtle crash when undo buffer set to a value less + than one. + - Issue #21044: tarfile.open() now handles fileobj with an integer 'name' attribute. Based on patch by Martin Panter. |