diff options
author | eustas <eustas.ru@gmail.com> | 2016-06-23 11:02:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-23 11:02:53 +0200 |
commit | 27f9d00efc10f7f43127baeed1e3315475422e69 (patch) | |
tree | d064255b490168b0388f5fdf994b804fb63a637d | |
parent | 2c16351987e96134223afa091e38464fba8ca7d5 (diff) | |
download | brotli-27f9d00efc10f7f43127baeed1e3315475422e69.zip brotli-27f9d00efc10f7f43127baeed1e3315475422e69.tar.gz brotli-27f9d00efc10f7f43127baeed1e3315475422e69.tar.bz2 |
Fix issue #383
-rw-r--r-- | python/brotlimodule.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/brotlimodule.cc b/python/brotlimodule.cc index de3f095..9e8c01a 100644 --- a/python/brotlimodule.cc +++ b/python/brotlimodule.cc @@ -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"); } |