Skip to content

Commit

Permalink
fix: SEGV
Browse files Browse the repository at this point in the history
  • Loading branch information
SpringMT committed May 24, 2024
1 parent 8d635c6 commit 4377656
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions ext/zstdruby/zstdruby.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ static VALUE decompress_buffered(ZSTD_DCtx* dctx, const char* input_data, size_t
rb_raise(rb_eRuntimeError, "%s: %s", "ZSTD_decompressStream failed", ZSTD_getErrorName(ret));
}
rb_str_modify_expand(output_string, buffOutSize);
output.dst = RSTRING_PTR(output_string) + output.size;
output.size += buffOutSize;
output.dst = output.dst + output.size;
}
rb_str_set_len(output_string, output.pos);
ZSTD_freeDCtx(dctx);
Expand Down

0 comments on commit 4377656

Please sign in to comment.