pkgsrc/lang/ruby18-base/patches/patch-ee
taca 6a15ee56b6 Update ruby18-base to 1.8.7.302 (Ruby 1.8.7 patchlevel 302).
Since many changes from previous release, please refer
http://www.ruby-lang.org/en/news/2010/08/16/ruby-1-8-7-p302-is-released/.

Note: Since all security updates are already in previous package,
This update dosen't include any securify fix.
2010-09-10 03:29:00 +00:00

42 lines
1.2 KiB
Text

$NetBSD: patch-ee,v 1.1 2010/09/10 03:29:01 taca Exp $
* r18172: suppress warnings.
* r23015: (GetDigestPtr): use StringValueCStr instead of STR2CSTR.
* r23506: (Init_ossl_digest): avoid recursing require.
--- ext/openssl/ossl_digest.c.orig 2008-02-25 08:48:57.000000000 +0000
+++ ext/openssl/ossl_digest.c
@@ -38,7 +38,7 @@ GetDigestPtr(VALUE obj)
const EVP_MD *md;
if (TYPE(obj) == T_STRING) {
- const char *name = STR2CSTR(obj);
+ const char *name = StringValueCStr(obj);
md = EVP_get_digestbyname(name);
if (!md)
@@ -96,7 +96,6 @@ ossl_digest_initialize(int argc, VALUE *
{
EVP_MD_CTX *ctx;
const EVP_MD *md;
- char *name;
VALUE type, data;
rb_scan_args(argc, argv, "11", &type, &data);
@@ -182,7 +181,7 @@ ossl_digest_finish(int argc, VALUE *argv
rb_str_resize(str, EVP_MD_CTX_size(ctx));
}
- EVP_DigestFinal_ex(ctx, RSTRING_PTR(str), NULL);
+ EVP_DigestFinal_ex(ctx, (unsigned char *)RSTRING_PTR(str), NULL);
return str;
}
@@ -234,7 +233,6 @@ ossl_digest_block_length(VALUE self)
void
Init_ossl_digest()
{
- rb_require("openssl");
rb_require("digest");
#if 0 /* let rdoc know about mOSSL */