As @kou pointed out in <https://bugs.ruby-lang.org/issues/19315#note-36>, `rb_str_to_cstr()` in string.c returns NULL if the string is found to contain NUL bytes in the middle. IMO an exception more often is desirable for typical use ...rhenium (Kazuki Yamaguchi)
Extracted from https://bugs.ruby-lang.org/issues/19315#note-35 It would be nice to have a utility function whose sole purpose is to obtain a C string (NUL-terminated and containing no NUL bytes) from a Ruby String. I suggest adding so...rhenium (Kazuki Yamaguchi)
kou (Kouhei Sutou) wrote in #note-36: > rhenium (Kazuki Yamaguchi) wrote in #note-35: > ... On top of my head: I think some users will have to choose between adding new `RB_GC_GUARD()` for temporary objects on the stack or migrating to...rhenium (Kazuki Yamaguchi)
kou (Kouhei Sutou) wrote in #note-27: > I think that the current `RSTRING_PTR()` for non frozen `String` also has similar situation. If arbitrary Ruby code changes the target `String`, pointer returned by `RSTRING_PTR()` may be invalid:...rhenium (Kazuki Yamaguchi)
Eregon (Benoit Daloze) wrote in #note-22: > What's the problem? > ... I think it would also be a problem in `some_function_call(RSTRING_PTR(str), RSTRING_END(str))`, where the evaluation order is not guaranteed. --- himura467 (Ak...rhenium (Kazuki Yamaguchi)
Feeding a deeply nested constructed encoding to OpenSSL::ASN1.decode, .decode_all, or .traverse can cause unbounded recursion and result in SystemStackError. Add an explicit nesting depth limit of 200 levels and raise OpenSSL::ASN1::ASN...rhenium (Kazuki Yamaguchi)
OpenSSL::KDF.pbkdf2_hmac and .scrypt are currently not interrupted by Timeout.timeout because they make a single, slow OpenSSL function call during which Ruby-level interrupts cannot be handled. Add advice against using parameters from u...rhenium (Kazuki Yamaguchi)
On my computer, setting RLIMIT_NPROC to the low value of 2048 prevents the forked process from creating any new native threads and it causes make test-all to hang forever. Remove it, as it does not seem to serve any purpose here.rhenium (Kazuki Yamaguchi)
The man page discourages using this behavior because it may leave the object in an inconsistent state on error paths. This fixes a potential memory leak reported at <https://github.com/ruby/openssl/issues/1011>. https://github.com/ruby/...rhenium (Kazuki Yamaguchi)