diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-28 04:22:15 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-28 04:22:15 +0000 |
commit | 22bc771fc1605e0414a4d8cda4c3a8b82cb812f4 (patch) | |
tree | 8f188bb45eec86be3b44e42c630d850096dcb93a /ext | |
parent | 320eae266023d61e2e1f21211d85d93fc534c336 (diff) |
merge revision(s) 45701: [Backport #9771]
* ext/openssl/ossl_asn1.c (ossl_asn1_initialize): SYMID on a value
other than Symbol is an undefined behavior. fix up r31699.
[ruby-core:62142] [Bug #9771]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@46200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/ossl_asn1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/openssl/ossl_asn1.c b/ext/openssl/ossl_asn1.c index e66abe85a9..8bd88f3012 100644 --- a/ext/openssl/ossl_asn1.c +++ b/ext/openssl/ossl_asn1.c @@ -1150,7 +1150,7 @@ ossl_asn1_initialize(int argc, VALUE *argv, VALUE self) } if(!SYMBOL_P(tag_class)) ossl_raise(eASN1Error, "invalid tag class"); - if(SYM2ID(tagging) == sIMPLICIT && NUM2INT(tag) > 31) + if(!NIL_P(tagging) && SYM2ID(tagging) == sIMPLICIT && NUM2INT(tag) > 31) ossl_raise(eASN1Error, "tag number for Universal too large"); } else{ |