Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix the buffer allocation in zstream_expand_buffer_into() since rb_bs…

…tr_new() does not allocate buffer to store the binary strings
  • Loading branch information...
commit bfd2493b6e306bb2ff5864d3bf2acaeb273b93cd 1 parent 12b7c19
@Watson1978 Watson1978 authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  ext/zlib/zlib.c
View
1  ext/zlib/zlib.c
@@ -474,6 +474,7 @@ zstream_expand_buffer_into(struct zstream *z, int size)
{
if (NIL_P(z->buf)) {
GC_WB(&z->buf, rb_bstr_new());
+ rb_bstr_resize(z->buf, size);
z->buf_filled = 0;
z->stream.next_out = BSTRING_PTR_BYTEF(z->buf);
z->stream.avail_out = size;
Please sign in to comment.
Something went wrong with that request. Please try again.