summaryrefslogtreecommitdiff
path: root/ext/openssl/ossl_x509name.c
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-15 06:46:19 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-15 06:46:19 +0000
commitdb82a3315ba7ca71d41ee108f865f9e43443eb18 (patch)
tree94cbb34264b0284f2ff7220ea6f488c05ba00436 /ext/openssl/ossl_x509name.c
parent6f3923f29e8b753a1e1eb0f924eec73330e3f931 (diff)
* ext/openssl/ossl_x509name.c (ossl_x509name_to_a): avoid SEGV
(rollback the previous commit). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/openssl/ossl_x509name.c')
-rw-r--r--ext/openssl/ossl_x509name.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c
index 4a077af..fdd94da 100644
--- a/ext/openssl/ossl_x509name.c
+++ b/ext/openssl/ossl_x509name.c
@@ -185,13 +185,13 @@ ossl_x509name_to_a(VALUE self)
const char *short_name;
VALUE ary, ret;
+ GetX509Name(self, name);
entries = X509_NAME_entry_count(name);
if (entries < 0) {
OSSL_Debug("name entries < 0!");
return rb_ary_new();
}
ret = rb_ary_new2(entries);
- GetX509Name(self, name);
for (i=0; i<entries; i++) {
if (!(entry = X509_NAME_get_entry(name, i))) {
ossl_raise(eX509NameError, NULL);