summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-11-10 16:31:29 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-11-10 16:31:29 (GMT)
commitc5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53 (patch)
tree00b40cbf093bf1aac214897c91b72fe40abfeb9e /generic
parent18425b42d186aee1a919721890d7ffeb875137c3 (diff)
downloadtcl-c5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53.zip
tcl-c5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53.tar.gz
tcl-c5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53.tar.bz2
[261a8a79f0] Integer overflow leads to segfault.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIO.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 9a4735f..7bc849e 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -5938,7 +5938,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;