From 42ca25f597bc6158477002071f38f85834fa4f79 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Tue, 25 Sep 2018 21:58:06 +0200 Subject: cppcheck: out of bounds ziptool [util/ziptool.cpp:1235]: (error) Array 'lenBases[29]' accessed at index 29, which is out of bounds. [util/ziptool.cpp:1236]: (error) Array 'lenBases[29]' accessed at index 29, which is out of bounds. --- src/util/ziptool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util/ziptool.cpp') diff --git a/src/util/ziptool.cpp b/src/util/ziptool.cpp index 7f2654876..fc13b836f 100644 --- a/src/util/ziptool.cpp +++ b/src/util/ziptool.cpp @@ -1230,7 +1230,7 @@ void Deflater::encodeDistStatic(unsigned int len, unsigned int dist) } bool found = false; - for (int i=0 ; i<30 ; i++) + for (int i=0 ; i<29 ; i++) { unsigned int base = lenBases[i].base; unsigned int range = lenBases[i].range; -- cgit v1.2.3