summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2010-03-18 20:38:43 (GMT)
committerdgp <dgp@users.sourceforge.net>2010-03-18 20:38:43 (GMT)
commit5255a10338236dc3adc27e5f3fd811546f4fc09e (patch)
tree891debe41e41785e24733aec27b1ff525c3ae425 /tests
parent82f9f4d9ac6ecb9764104e6e81e9596a0392009f (diff)
downloadtcl-5255a10338236dc3adc27e5f3fd811546f4fc09e.zip
tcl-5255a10338236dc3adc27e5f3fd811546f4fc09e.tar.gz
tcl-5255a10338236dc3adc27e5f3fd811546f4fc09e.tar.bz2
* generic/tclListObj.c: Prevent in overflow trouble in [lreplace]
* generic/tclTestObj.c: operations. Thanks to kbk for fix and test. * tests/listObj.test: [Bug 2971669].
Diffstat (limited to 'tests')
-rw-r--r--tests/listObj.test26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/listObj.test b/tests/listObj.test
index a3c9f20..515592b 100644
--- a/tests/listObj.test
+++ b/tests/listObj.test
@@ -11,13 +11,15 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: listObj.test,v 1.8 2005/07/27 18:12:43 dgp Exp $
+# RCS: @(#) $Id: listObj.test,v 1.8.10.1 2010/03/18 20:38:43 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
+testConstraint testobj [llength [info commands testobj]]
+
catch {unset x}
test listobj-1.1 {Tcl_GetListObjType} emptyTest {
# Test removed; tested an internal detail
@@ -175,6 +177,28 @@ test listobj-9.1 {UpdateStringOfList} {
string length [list foo\x00help]
} 8
+test listobj-10.1 {Bug [2971669]} {*}{
+ -constraints testobj
+ -setup {
+ testobj freeallvars
+ }
+ -body {
+ set result {}
+ lappend result \
+ [testlistobj set 1 a b c d e] \
+ [testlistobj replace 1 0x7fffffff 0x7fffffff f] \
+ [testlistobj get 1]
+ }
+ -cleanup {
+ testobj freeallvars
+ }
+ -result {{a b c d e} {} {a b c d e f}}
+}
+
# cleanup
::tcltest::cleanupTests
return
+
+# Local Variables:
+# mode: tcl
+# End: \ No newline at end of file