summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-04 00:21:31 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-04 00:21:31 +0000
commitfae3aefe99abcfcbf25764c650e88122bdf4b5c5 (patch)
tree6d33595e38c71b1cadf2f00cc2944004cb143653
parentc6ab282224b451dbc412a7b5ea02dda197fe8054 (diff)
downloadruby-fae3aefe99abcfcbf25764c650e88122bdf4b5c5.tar.gz
ruby-fae3aefe99abcfcbf25764c650e88122bdf4b5c5.tar.xz
ruby-fae3aefe99abcfcbf25764c650e88122bdf4b5c5.zip
* ext/openssl/ossl_asn1.c (asn1time_to_time): should check that
the underlying value of ASN1_TIME isn't NULL. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/openssl/ossl_asn1.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 6eab77313..45c755de1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Dec 4 09:12:43 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
+
+ * ext/openssl/ossl_asn1.c (asn1time_to_time): should check that
+ the underlying value of ASN1_TIME isn't NULL.
+
Thu Dec 4 08:29:43 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* lib/webrick/server.rb (GenericServer#start): should rescue
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c
index 02d2f2caf..f0d8dda9b 100644
--- a/ext/openssl/ossl_asn1.c
+++ b/ext/openssl/ossl_asn1.c
@@ -28,9 +28,7 @@ asn1time_to_time(ASN1_TIME *time)
struct tm tm;
VALUE argv[6];
- if (!time) {
- ossl_raise(rb_eTypeError, "ASN1_TIME is NULL!");
- }
+ if (!time || !time->data) return Qnil;
memset(&tm, 0, sizeof(struct tm));
switch (time->type) {