Project

General

Profile

« Previous | Next » 

Revision 8888ad69

Added by rhenium (Kazuki Yamaguchi) 5 months ago

[ruby/openssl] ossl.c: avoid using sk_*() functions with NULL

Always use explicit NULL checks before interacting with STACK_OF().
Even though most OpenSSL functions named sk_
() do not crash if we pass
NULL as the receiver object, depending on this behavior would be a bad
idea.

Checks for a negative number return from sk_*_num() are removed. This
can only happen when the stack is NULL.

ossl_*_sk2ary() must no longer be called with NULL.

https://github.com/ruby/openssl/commit/84cffd4f77