Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

correctly resize the compressed string

  • Loading branch information...
commit 2efa2619689ad823650c305c6879b9d7b7471da1 1 parent 8e6baf9
@steeve authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  src/python-lz4.c
View
1  src/python-lz4.c
@@ -23,6 +23,7 @@ py_lz4_compress(PyObject *self, PyObject *args)
dest = (char *)PyString_AsString(result);
*((int *)dest) = source_size;
osize = LZ4_compress(source, dest + sizeof(int), source_size);
+ _PyString_Resize(&result, sizeof(int) + osize);
return result;
}
Please sign in to comment.
Something went wrong with that request. Please try again.