summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-11-10 16:34:04 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-11-10 16:34:04 (GMT)
commit47ffd7bc8e8b6cd4e4f86ec9bc969a4319fb291c (patch)
tree1d9306a12e4795496921cb288564d6a3ce0419f2
parent573cabc6d240f1e84a271373810ae254a2dd4791 (diff)
parentc5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53 (diff)
downloadtcl-47ffd7bc8e8b6cd4e4f86ec9bc969a4319fb291c.zip
tcl-47ffd7bc8e8b6cd4e4f86ec9bc969a4319fb291c.tar.gz
tcl-47ffd7bc8e8b6cd4e4f86ec9bc969a4319fb291c.tar.bz2
[261a8a79f0] Integer overflow leads to segfault.
-rw-r--r--generic/tclIO.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 8e9e346..f93d00d 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -6380,7 +6380,7 @@ TranslateInputEOL(
break;
default:
/* In other modes, at most 2 src bytes become a dst byte. */
- if (srcLen > 2 * dstLen) {
+ if (srcLen/2 > dstLen) {
srcLen = 2 * dstLen;
}
break;