From 8195a5c946f55848d21195c70e551b65123c6f21 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Tue, 6 Oct 2015 19:49:11 +0100 Subject: [PATCH] [brotlimodule.cc] set 'lgwin' valid range to [10..24] --- python/brotlimodule.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/brotlimodule.cc b/python/brotlimodule.cc index 269de2d..da4c2eb 100644 --- a/python/brotlimodule.cc +++ b/python/brotlimodule.cc @@ -53,8 +53,8 @@ static int lgwin_convertor(PyObject *o, int *lgwin) { } *lgwin = PyInt_AsLong(o); - if (*lgwin < 16 || *lgwin > 24) { - PyErr_SetString(BrotliError, "Invalid lgwin. Range is 16 to 24."); + if (*lgwin < 10 || *lgwin > 24) { + PyErr_SetString(BrotliError, "Invalid lgwin. Range is 10 to 24."); return 0; } @@ -90,7 +90,7 @@ PyDoc_STRVAR(compress__doc__, " density tradeoff. The higher the quality, the slower the compression.\n" " Range is 0 to 11. Defaults to 11.\n" " lgwin (int, optional): Base 2 logarithm of the sliding window size. Range\n" -" is 16 to 24. Defaults to 22.\n" +" is 10 to 24. Defaults to 22.\n" " lgblock (int, optional): Base 2 logarithm of the maximum input block size.\n" " Range is 16 to 24. If set to 0, the value will be set based on the\n" " quality. Defaults to 0.\n"