Project

General

Profile

Actions

Bug #4344

closed

[ext/openssl] BN comparison to nil fails

Added by MartinBosslet (Martin Bosslet) about 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
all 1.9.2
Backport:
[ruby-core:34987]

Description

=begin
Hi all,

this currently fails in all 1.9.2 versions including trunk:

require 'openssl'

bn = OpenSSL::BN.new("1")
bn == nil

=> in `eql?': Cannot convert into OpenSSL::BN (TypeError)

The reason is that GetBNPtr(VALUE obj) did not cover the case for obj being nil.
Patch is attached.

Regards,
Martin
=end


Files

fix_bn_cmp.diff (1.01 KB) fix_bn_cmp.diff MartinBosslet (Martin Bosslet), 01/30/2011 03:19 AM
Actions #1

Updated by naruse (Yui NARUSE) about 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r30724.
Martin, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • ext/openssl/ossl_bn.c (GetBNPtr): add missing nil case.
    patched by Martin Bosslet. [ruby-core:34987]
    =end
Actions

Also available in: Atom PDF

Like0
Like0