From 582fa9cde99778a98a5ddf25e5dd4b9bc961ef3e Mon Sep 17 00:00:00 2001 From: rhe Date: Mon, 23 May 2016 11:40:07 +0000 Subject: openssl: use StringValueCStr() where NUL-terminated string is expected * ext/openssl/ossl_asn1.c, ext/openssl/ossl_bn.c, ext/openssl/ossl_cipher.c, ext/openssl/ossl_digest.c ext/openssl/ossl_engine.c, ext/openssl/ossl_ns_spki.c ext/openssl/ossl_pkcs12.c, ext/openssl/ossl_pkcs7.c ext/openssl/ossl_pkey.c, ext/openssl/ossl_pkey_ec.c ext/openssl/ossl_rand.c, ext/openssl/ossl_ssl.c ext/openssl/ossl_x509attr.c, ext/openssl/ossl_x509cert.c ext/openssl/ossl_x509ext.c, ext/openssl/ossl_x509store.c: Use StringValueCStr() where NUL-terminated string is expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55134 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/openssl/ossl_x509store.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/openssl/ossl_x509store.c') diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c index 8d6f9de2b8..f3501e531a 100644 --- a/ext/openssl/ossl_x509store.c +++ b/ext/openssl/ossl_x509store.c @@ -240,8 +240,8 @@ ossl_x509store_add_file(VALUE self, VALUE file) char *path = NULL; if(file != Qnil){ - SafeStringValue(file); - path = RSTRING_PTR(file); + rb_check_safe_obj(file); + path = StringValueCStr(file); } GetX509Store(self, store); lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file()); @@ -261,8 +261,8 @@ ossl_x509store_add_path(VALUE self, VALUE dir) char *path = NULL; if(dir != Qnil){ - SafeStringValue(dir); - path = RSTRING_PTR(dir); + rb_check_safe_obj(dir); + path = StringValueCStr(dir); } GetX509Store(self, store); lookup = X509_STORE_add_lookup(store, X509_LOOKUP_hash_dir()); -- cgit v1.2.3