diff options
author | dgp <dgp@users.sourceforge.net> | 2015-11-10 16:31:29 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-11-10 16:31:29 (GMT) |
commit | c5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53 (patch) | |
tree | 00b40cbf093bf1aac214897c91b72fe40abfeb9e | |
parent | 18425b42d186aee1a919721890d7ffeb875137c3 (diff) | |
download | tcl-c5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53.zip tcl-c5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53.tar.gz tcl-c5b0b72ed7cbfd413896d9c9b0cb7bdcf521fc53.tar.bz2 |
[261a8a79f0] Integer overflow leads to segfault.
-rw-r--r-- | generic/tclIO.c | 2 |
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; |