aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMo Morsi <mo@morsi.org>2020-02-05 22:02:10 -0500
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2020-02-06 23:01:44 +1300
commit90b6d2b283f0b817b17b90a7081b92aa213565cb (patch)
treecd232693173bcfd1fa30dc50e79cfbd0c44fae62
parent8c38449c2ae39ea6f59995e5f77a4d3925867d48 (diff)
downloadruby-openssl-90b6d2b283f0b817b17b90a7081b92aa213565cb.tar.gz
'finished' messages: expand sizer array to 1-bytes
Zero-size arrays not playing nicely with visual studio / mingw, see: https://github.com/ruby/ruby/pull/2693 Also see related discussion pertaining to using NULL pointer here: https://github.com/ruby/openssl/pull/315
-rw-r--r--ext/openssl/ossl_ssl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c
index 484057cd..432d404a 100644
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -2407,8 +2407,8 @@ ossl_ssl_get_finished(VALUE self)
GetSSL(self, ssl);
- char sizer[0];
- size_t len = SSL_get_finished(ssl, sizer, 0);
+ char sizer[1];
+ size_t len = SSL_get_finished(ssl, sizer, 1);
if(len == 0)
return Qnil;
@@ -2432,8 +2432,8 @@ ossl_ssl_get_peer_finished(VALUE self)
GetSSL(self, ssl);
- char sizer[0];
- size_t len = SSL_get_peer_finished(ssl, sizer, 0);
+ char sizer[1];
+ size_t len = SSL_get_peer_finished(ssl, sizer, 1);
if(len == 0)
return Qnil;