diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2015-07-31 22:05:20 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2015-07-31 22:05:20 (GMT) |
commit | 7239216affd24b23526c606fe0cfed2d41c7305b (patch) | |
tree | afcf0cb47a2b1fad144ed62c1b97a8b6e6e2ed66 /unix | |
parent | ebfeba748ff271021528a24c0ccf6e6f279ba347 (diff) | |
download | tcl-7239216affd24b23526c606fe0cfed2d41c7305b.zip tcl-7239216affd24b23526c606fe0cfed2d41c7305b.tar.gz tcl-7239216affd24b23526c606fe0cfed2d41c7305b.tar.bz2 |
fix off-by-one possible buffer overrun when looking for encodings; found by coverity
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixInit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 520c8e5..5fc0035 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -602,7 +602,7 @@ SearchKnownEncodings( int left = 0; int right = sizeof(localeTable)/sizeof(LocaleTable); - while (left <= right) { + while (left < right) { int test = (left + right)/2; int code = strcmp(localeTable[test].lang, encoding); |