]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - lib/zlib_inflate/inftrees.c
lib/zlib_inflate/inftrees.c: fix potential buffer overflow
[karo-tx-linux.git] / lib / zlib_inflate / inftrees.c
index 3fe6ce5b53e51999b0ad15f97843b93c313cb60f..02894305292663abc7c4ac9b8e1fbaed18396f6b 100644 (file)
@@ -109,7 +109,7 @@ int zlib_inflate_table(codetype type, unsigned short *lens, unsigned codes,
         *bits = 1;
         return 0;     /* no symbols, but wait for decoding to report error */
     }
-    for (min = 1; min <= MAXBITS; min++)
+    for (min = 1; min < MAXBITS; min++)
         if (count[min] != 0) break;
     if (root < min) root = min;