1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
gotoyuzo 2004-12-15 06:46:19 +00:00
parent 6f3923f29e
commit db82a3315b
2 changed files with 6 additions and 1 deletions

View file

@ -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.

View file

@ -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);