This commit is contained in:
eustas 2016-06-23 11:02:53 +02:00 committed by GitHub
parent 2c16351987
commit 27f9d00efc

View File

@ -174,7 +174,7 @@ static PyObject* brotli_compress(PyObject *self, PyObject *args, PyObject *keywd
end:
BrotliEncoderDestroyInstance(enc);
if (ok) {
ret = PyBytes_FromStringAndSize((char*)output, output_length);
ret = PyBytes_FromStringAndSize((char*)output, output_length - available_out);
} else {
PyErr_SetString(BrotliError, "BrotliCompressBuffer failed");
}