[ruby/openssl] digest: make output buffer String independent in #finish
Likewise, OpenSSL::Digest#finish needs to make the output buffer independent before writing to it. https://github.com/ruby/openssl/commit/9cc8a83466
This commit is contained in:
parent
637f019f1f
commit
9de2b407d7
Notes:
git
2024-12-21 18:34:04 +00:00
@ -259,6 +259,7 @@ ossl_digest_finish(int argc, VALUE *argv, VALUE self)
|
||||
str = rb_str_new(NULL, out_len);
|
||||
} else {
|
||||
StringValue(str);
|
||||
rb_str_modify(str);
|
||||
rb_str_resize(str, out_len);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user