diff options
author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-15 06:46:19 +0000 |
---|---|---|
committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-15 06:46:19 +0000 |
commit | db82a3315ba7ca71d41ee108f865f9e43443eb18 (patch) | |
tree | 94cbb34264b0284f2ff7220ea6f488c05ba00436 | |
parent | 6f3923f29e8b753a1e1eb0f924eec73330e3f931 (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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/openssl/ossl_x509name.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Wed Dec 15 15:39:32 2004 GOTOU Yuuzou <gotoyuzo@notwork.org> + + * ext/openssl/ossl_x509name.c (ossl_x509name_to_a): avoid SEGV + (rollback the previous commit). + Wed Dec 15 14:22:10 2004 NAKAMURA Usaku <usa@ruby-lang.org> * win32/win32.c (rb_w32_fdisset): check whether the handle is valid. diff --git a/ext/openssl/ossl_x509name.c b/ext/openssl/ossl_x509name.c index 4a077af2d5..fdd94da15a 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); |