diff options
author | dkf <dkf@noemail.net> | 2004-02-09 14:40:29 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2004-02-09 14:40:29 (GMT) |
commit | c29857342f1689b5294412bbcf27ad8a6592b37d (patch) | |
tree | 140363945375e380f5a86f7aa28b0f838b83757f /tests | |
parent | 18001472a1ea41ac386eacb16325c36e8414ea24 (diff) | |
download | tk-c29857342f1689b5294412bbcf27ad8a6592b37d.zip tk-c29857342f1689b5294412bbcf27ad8a6592b37d.tar.gz tk-c29857342f1689b5294412bbcf27ad8a6592b37d.tar.bz2 |
Stop crashes when copying a large photo to itself causes resizing. [Bug 877950]
FossilOrigin-Name: a0d4ef0f52197368ac9f99b5aaf91659cdec3f09
Diffstat (limited to 'tests')
-rw-r--r-- | tests/imgPhoto.test | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test index e2b4468..72724d3 100644 --- a/tests/imgPhoto.test +++ b/tests/imgPhoto.test @@ -9,7 +9,7 @@ # # Author: Paul Mackerras (paulus@cs.anu.edu.au) # -# RCS: @(#) $Id: imgPhoto.test,v 1.15 2002/10/18 00:48:22 hobbs Exp $ +# RCS: @(#) $Id: imgPhoto.test,v 1.15.2.1 2004/02/09 14:40:31 dkf Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -661,6 +661,14 @@ test imgPhoto-15.1 {photo images can fail to allocate memory gracefully} \ list [catch {image create photo -width 32000 -height 32000} msg] $msg } {1 {not enough free memory for image buffer}} +test imgPhoto-16.1 {copying to self doesn't access freed memory} { + # Bug 877950 makes this crash when trying to copy out of a deallocated area + set photo [image create photo] + $i put red -to 0 0 1000 1000 + $i copy $i -from 0 0 1000 1000 -to 500 0 + image delete $i +} {} + destroy .c eval image delete [image names] |