summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorferrieux <ferrieux@users.sourceforge.net>2011-07-19 18:13:53 (GMT)
committerferrieux <ferrieux@users.sourceforge.net>2011-07-19 18:13:53 (GMT)
commit6dc6abffa7924bc7ef004be95916702634242133 (patch)
tree164e91662821b9684736a6507ea9216888dfce69 /generic/tclUtil.c
parent72d34422eacbba7943133639ab202f4cb9869a06 (diff)
downloadtcl-6dc6abffa7924bc7ef004be95916702634242133.zip
tcl-6dc6abffa7924bc7ef004be95916702634242133.tar.gz
tcl-6dc6abffa7924bc7ef004be95916702634242133.tar.bz2
Fix [bug 3371644] -- crash on Tcl_ConvertElement with leading pound.
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c4
1 files changed, 3 insertions, 1 deletions
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;
}