diff options
author | Samuel Giddins <[email protected]> | 2024-04-11 14:28:07 -0500 |
---|---|---|
committer | git <[email protected]> | 2024-05-14 21:44:34 +0000 |
commit | e3e1e53098f3214ef12849b3441791465ad7c0a5 (patch) | |
tree | 0e9e6970e1234dc97759791d5eb98e5bd381596f | |
parent | e33336cb37b47834c0448921c6c4942e3fa63996 (diff) |
[ruby/zlib] Avoid double copying into provided outbuf
https://github.com/ruby/zlib/commit/07f44b7546
-rw-r--r-- | ext/zlib/zlib.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index b1623546e6..aad9f8d28a 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -2961,11 +2961,6 @@ gzfile_readpartial(struct gzfile *gz, long len, VALUE outbuf) dst = zstream_shift_buffer(&gz->z, len, outbuf); gzfile_calc_crc(gz, dst); - if (!NIL_P(outbuf)) { - rb_str_resize(outbuf, RSTRING_LEN(dst)); - memcpy(RSTRING_PTR(outbuf), RSTRING_PTR(dst), RSTRING_LEN(dst)); - dst = outbuf; - } return dst; } |