diff options
author | ferrieux <ferrieux@noemail.net> | 2011-07-19 18:13:53 (GMT) |
---|---|---|
committer | ferrieux <ferrieux@noemail.net> | 2011-07-19 18:13:53 (GMT) |
commit | 53534fd72419b1f2f15398a9da87f588f54137ac (patch) | |
tree | 164e91662821b9684736a6507ea9216888dfce69 | |
parent | fcdbb906a4f787217784f29b2b3d97f145f54b3d (diff) | |
download | tcl-53534fd72419b1f2f15398a9da87f588f54137ac.zip tcl-53534fd72419b1f2f15398a9da87f588f54137ac.tar.gz tcl-53534fd72419b1f2f15398a9da87f588f54137ac.tar.bz2 |
Fix [bug 3371644] -- crash on Tcl_ConvertElement with leading pound.
FossilOrigin-Name: 4fadf0bce5ff2e411565f5798a438f58ffbb2e39
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | generic/tclUtil.c | 4 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2011-07-19 Alexandre Ferrieux <ferrieux@users.sourceforge.net> + + * generic/tclUtil.c: Fix [bug 3371644] -- crash on Tcl_ConvertElement with leading pound. + 2011-07-19 Donal K. Fellows <dkf@users.sf.net> * doc/*.3, doc/*.n: Many small fixes to documentation as part of diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 6f36dad..55103e3 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1261,7 +1261,9 @@ int TclConvertElement( p[1] = '#'; p += 2; src++; - length--; + if (length > 0) { + length--; + } } else { conversion = CONVERT_BRACE; } |