summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--generic/tclUtil.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e97bb11..1a0e4dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;
}