6213 Commits
Author SHA1 Message Date
usa 556e9f726e * ext/openssl: backport changes from openssl 2.1.2.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@65135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-10-17 15:34:06 +00:00
usa 32c00d78a6 merge revision(s) 63000:
unixsocket.c: abstract namespace

	* ext/socket/unixsocket.c (unixsock_path_value): fix r62991 for
	  Linux abstract namespace.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@63005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28 12:24:32 +00:00
usa 634232aab5 merge revision(s) 62991:
unixsocket.c: check NUL bytes

	* ext/socket/unixsocket.c (rsock_init_unixsock): check NUL bytes.
	  https://hackerone.com/reports/302997

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28 10:32:32 +00:00
usa cbe9a21e08 backport some changes from openssl gem v2.0.6 and v2.0.7.
[Backport #13935]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28 06:49:42 +00:00
usa b63b168ce9 merge revision(s) 60162: [Backport #13994]
socket.c: null byte at Socket.getnameinfo

	* ext/socket/socket.c (sock_s_getnameinfo): check null byte.
	  patched by tommy (Masahiro Tomita) in [ruby-dev:50286].
	  [Bug #13994]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28 05:59:44 +00:00
usa 58cfb0653e merge revision(s) 62572: [Backport #14549]
date_core.c: defensive code

	* ext/date/date_core.c (f_cmp): check comparison failure.

	* ext/date/date_core.c (d_lite_step): deal with the comparison
	  result more defensively.  [ruby-core:85796] [Bug #14549]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-28 05:54:08 +00:00
usa c2fdfb05a4 merge https://github.com/ruby/openssl/commit/3af2635f117f8da563d180bc1c58702aecb16e0c
patched by Kazuki Yamaguchi <k@rhe.jp>

	bio: prevent possible GC issue in ossl_obj2bio()

	Prevent the new object created by StringValue() from being GCed.
	Luckily, as none of the callers of ossl_obj2bio() reads from the
	returned BIO after possible triggering GC, this has not been a real
	problem.

	As a bonus, ossl_protect_obj2bio() function which is no longer used
	anywhere is removed.

	merge https://github.com/ruby/openssl/commit/f842b0d5c5e37527c11954a4b7a98c8d9cc57865
	patched by Kazuki Yamaguchi <k@rhe.jp>

	bio: do not use the FILE BIO method in ossl_obj2bio()

	Read everything from an IO object into a String first and use the
	memory buffer BIO method just as we do for String inputs.

	For MSVC builds, the FILE BIO method uses the "UPLINK" interface that
	requires the application to provide OPENSSL_Applink() function. For us,
	the "application" means ruby.exe, in which we can't do anything. As a
	workaround, avoid using the FILE BIO method at all.

	Usually private keys or X.509 certificates aren't that large and the
	temporarily increased memory usage hopefully won't be an issue.

	ext/openssl/ossl_version.h (OpenSSL::VERSION): bump to 1.1.1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-22 03:33:56 +00:00
usa 3d6510c514 merge revision(s) 60071: [Backport #13953] [Backport #13954] [Backport #13955] [Backport #13957]
ext: check if null byte is contained

	[ruby-dev:50267] [Bug #13953]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 13:38:59 +00:00
usa 4238b67dd9 merge revision(s) 58020: [Backport #10936]
date_core.c: fix error in DateTime docs

	* ext/date/date_core.c: [DOC] fix format string for DateTime#rfc3339.
	  Reported by Andreas Rayo Kniep.  [ruby-core:68418] [Bug #10936]

	* ext/date/date_core.c: [DOC] ditto for DateTime#iso8601 and
	  DateTime#xmlschema; other small improvements.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-31 11:10:20 +00:00
usa 95c9c1dc15 * ext/bigdecimal/bigdecimal.c (BigDecimal_hash): st_index_t may not be
fixable on 64bit mswin/mingw.

* ext/date/date_core.c (d_lite_hash): ditto.
  [Backport #13877]

* ext/openssl/ossl_bn.c (ossl_bn_hash): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-14 04:16:51 +00:00
usa 1433d4337c asn1: fix out-of-bounds read in decoding constructed objects
* OpenSSL::ASN1.{decode,decode_all,traverse}: have a bug of
  out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the
  correct available length to ossl_asn1_decode() when decoding the
  inner components of a constructed object. This can cause
  out-of-bounds read if a crafted input given.

Reference: https://hackerone.com/reports/170316
https://github.com/ruby/openssl/commit/1648afef33c1d97fb203c82291b8a61269e85d3b



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09 14:06:50 +00:00
usa 842d5cff6a * ext/json: bump to version 1.8.3.1. [Backport #13853]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-09 13:58:58 +00:00
usa 6b330d8fb0 merge revision(s) 59384: [Backport #13759]
strscan.c: fix segfault in aref

	* ext/strscan/strscan.c (strscan_aref): fix segfault after
	  get_byte or getch which do not apply regexp.
	  [ruby-core:82116] [Bug #13759]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 10:30:58 +00:00
usa f4a8004e31 merge revision(s) 59333,59337: [Backport #13616]
Zlib::GzipReader#pos underflows after calling #ungetbyte or #ungetc at start of file [Bug #13616]

	patched by Andrew Haines <andrew@haines.org.nz> [ruby-core:81488]
	zlib.c: fix unnormalized Fixnum

	* ext/zlib/zlib.c (rb_gzfile_total_out): cast to long not to
	  result in an unsigned long to normalized to Fixnum on LLP64
	  platforms.  [ruby-core:81488]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-09 08:08:01 +00:00
usa 739782e37a * ext/openssl/ossl_cipher.c: remove the encryption key initialization
from Cipher#initialize. This is effectively a revert of r32723
  ("Avoid possible SEGV from AES encryption/decryption", 2011-07-28).
  the patch is derived from https://github.com/ruby/openssl/commit/8108e0a6db133f3375608303fdd2083eb5115062,
  written by Kazuki Yamaguchi.
  [Backport #8221]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-05 07:06:45 +00:00
usa f16590ba1d * ext/psych/yaml: update libyaml to 0.1.7.
* ext/psych/psych.gemspec: bump version to 2.1.0.1.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 15:30:03 +00:00
usa 25a2e376bb merge revision(s) 59102: [Backport #13515]
pathname.rb: UNC root pathname needs a separator

	* ext/pathname/lib/pathname.rb (Pathname#plus): UNC root pathname
	  needs a separator.  File.basename returns "/" on UNC root, as
	  well as sole drive letter, even if it does not end with a
	  separator.  [ruby-core:80900] [Bug #13515]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 13:01:26 +00:00
usa c42f46bfc7 merge revision(s) 58643: [Backport #13231]
date_core.c: fix docs for %Z format

	* ext/date/date_core.c: [DOC] fix documentation for %Z format
	  of {Date,DateTime}.strftime.

	  Reported by Damon Timm.  Based on a patch by nano.
	  [ruby-core:79602] [Bug #13231] [Fix GH-1565]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:52:42 +00:00
usa 127c8a219f * ext/openssl/ossl_x509store.c: clear error queue after calling
X509_LOOKUP_load_file()

  X509_LOOKUP_load_file(), which ends up calling
  X509_load_cert_crl_file()
  internally, may leave error entries in the queue even when it returns
  non-zero value (which indicates success).

  This will be fixed by OpenSSL 1.1.1, but can be worked around by
  clearing the error queue ourselves.

  Fixes: [Backport #11033]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:42:31 +00:00
usa 687763bc4f merge revision(s) 56558,59116,59136: [Backport #12670]
* gc.c (heap_page_resurrect): do not return tomb_pages when
	  page->freelist == NULL.
	  [Bug #12670]

	test for [Bug #12670]

	heap corruption by deferred free.
	gc.c: expand sorted pages

	* gc.c (heap_page_allocate): expand sorted pages before inserting
	  allocated new page.  [Bug #12670]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:35:49 +00:00
usa 4757e396d2 merge revision(s) 59030,59031: [Backport #13638]
thread.c: avoid busy looping on rb_thread_fd_close

	We no longer use it this function, but extensions do, and
	we need to ensure it continues to work for them.

	* thread.c (rb_thread_fd_close): schedule other threads in loop
	* ext/-test-/thread_fd_close/thread_fd_close.c: new file
	* ext/-test-/thread_fd_close/depend: ditto
	* ext/-test-/thread_fd_close/extconf.rb: ditto
	* test/-ext-/thread_fd_close/test_thread_fd_close.rb: new test
	* properties.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 12:09:10 +00:00
usa 5024abe0cf merge revision(s) 58545,58584: [Backport #13536]
ripper/lexer.rb: nested indented heredoc

	* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): fix for
	  nested indedented here documents, where `Elem`s are nested too.
	  [ruby-core:80977] [Bug #13536]
	ripper/lexer.rb: nested indented heredoc

	* ext/ripper/lib/ripper/lexer.rb (on_heredoc_dedent): insert
	  stripped leading spaces as `on_ignored_sp` elements, so that the
	  original source can be reconsructed.
	  [ruby-core:80977] [Bug #13536]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@59214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-06-30 10:30:56 +00:00
nagachika 7b509a5c0c merge revision(s) 57265,57266: [Backport #13081]
win32/resolv.rb: ad hoc workaround

	* ext/win32/lib/win32/resolv.rb (Win32::Resolv::SZ): an ad hoc
	  workaround for broken registry.  SearchList and other registry
	  values must be REG_SZ, or Windows ignores anything in those
	  values otherwise.  [ruby-dev:49924] [Bug #13081]
	  https://github.com/rubygems/rubygems/issues/1700
	win32/registry.rb: registry type names

	* ext/win32/lib/win32/registry.rb (Win32::Registry#read): show
	  registry type names instead of numeric values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 16:15:52 +00:00
nagachika 7cbc39be69 merge revision(s) 58057: [Backport #13353]
stringio.c: RB_INTEGER_TYPE_P

	* ext/stringio/stringio.c (RB_INTEGER_TYPE_P): fallback definition
	  for 2.3 or earlier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 15:51:02 +00:00
nagachika 5194682b72 merge revision(s) 58040,58041: [Backport #13353]
stringio.c: check character code

	* ext/stringio/stringio.c (strio_ungetc): check if the character
	  code is valid in the encoding.  reported by Ahmad Sherif
	  (ahmadsherif) at https://hackerone.com/reports/209593.
	stringio.c: check range

	* ext/stringio/stringio.c (strio_ungetc): raise RangeError instead
	  of TypeError at too big value, as well as IO#ungetc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 15:35:54 +00:00
nagachika e0cb040a9b merge revision(s) 57280,57282: [Backport #13112]
console.c: OOB access

	* ext/io/console/console.c (console_set_winsize): fix
	  out-of-bounds access.  [ruby-core:79004] [Bug #13112]
	console.c: unpaired size

	* ext/io/console/console.c (console_set_winsize): reject unpaired
	  pixel size.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@58151 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-27 14:35:49 +00:00
nagachika 0f1e756310 revert r57571. merge revision(s) 55781,55783: [Backport #12604]
It breaked CI on vc12-x64
http://13.78.52.201/vc12-x64/ruby-2.3/log/20170207T182419Z.log.html.gz



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@57626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-14 09:56:33 +00:00
nagachika c59b391332 merge revision(s) 55781,55783: [Backport #12604]
* ext/win32/resolv/resolv.c (get_dns_server_list): [Win32] get DNS
	  servers only for connected network devices by GetNetworkParams
	  API.  [Bug #12604]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@57571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-07 17:28:57 +00:00
nagachika 6b24178534 merge revision(s) 56559,56582,56584,56585: [Backport #12903]
* test/ruby/test_file.rb (TestFile#test_stat): fix noatime case.
	  [ruby-core:77943] [Bug #12903]

	* ext/-test/file/fs.c (get_atime_p): Updating of file access times
	  is enabled or not.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14 18:15:22 +00:00
nagachika 93bceb14a4 merge revision(s) 55074: [Backport #12868]
* ext/openssl/ossl.c (Init_openssl): register an ex_data index for
	  X509_STORE and X509_STORE_CTX respectively. Since they don't share
	  the ex_data index registry, we can't use the same index.
	  (ossl_verify_cb): use the the correct index.

	* ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto.

	* ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto.
	  (ossl_x509stctx_verify): ditto.

	* ext/openssl/ossl.h (void ossl_clear_error): add extern declarations
	  of ossl_store_{ctx_,}ex_verify_cb_idx.

	* ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and
	  X509_STORE_get_ex_data.

	* ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data,
	  X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 02:48:35 +00:00
nagachika d56ccddb31 merge revision(s) 56550:
* ext/bigdecimal/bigdecimal.c: Import changes from ruby/bigdecimal
	  repository.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-05 02:32:13 +00:00
nagachika 54b80158f2 merge revision(s) 56281,56282:
strscan.c: use S_RESTLEN

	* ext/strscan/strscan.c (strscan_getch, strscan_peek),
  (strscan_rest_size, inspect2): use S_RESTLEN consistently.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-03 17:26:16 +00:00
nagachika dce01373fd merge revision(s) 55057:
* ext/openssl/ossl_pkcs12.c (ossl_pkcs12_initialize): pop errors
	  leaked by PKCS12_parse(). This is a bug in OpenSSL, which exists
	  in the versions before the version 1.0.0t, 1.0.1p, 1.0.2d.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-26 14:41:15 +00:00
nagachika 18f287a36d backport additional fix memory leak from openssl upstream.
https://github.com/ruby/openssl/commit/e76f076f093efb93dabf2cb042c527500f956061
patches are provided by rhe (Kazuki Yamaguchi).

* ext/openssl/ossl_x509ext.c: additional fix memory leak.
  [ruby-core:76922] [Bug #12680]

* text/openssl/test_x509ext.rb: test for above.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56032 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29 20:36:38 +00:00
nagachika ea5e22d102 backport fix memory leak from upstream.
https://github.com/ruby/openssl/compare/3a2840e80d275895523a526ce56e4f6e7b8f9cc4...1e30cd395b14ef46e04bdd9ab72f10067890b265
patches are provided by rhe (Kazuki Yamaguchi).

* ext/openssl/ossl_config.c: fix memory leak.  [ruby-core:76922] [Bug #12680]

* ext/openssl/ossl_ocsp.c: ditto.

* ext/openssl/ossl_pkcs12.c: ditto.

* ext/openssl/ossl_pkcs7.c: ditto.

* ext/openssl/ossl_pkey_ec.c: ditto.

* ext/openssl/ossl_x509.h: ditto.

* ext/openssl/ossl_x509attr.c: ditto.

* ext/openssl/ossl_x509crl.c: ditto.

* ext/openssl/ossl_x509ext.c: ditto.

* ext/openssl/ossl_x509req.c: ditto.

* ext/openssl/ossl_x509revoked.c: ditto.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@56018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-26 18:48:55 +00:00
nagachika a9e98cf7d4 merge revision(s) 55822: [Backport #12660]
* ext/openssl/ossl_ssl.c (ossl_ssl_write_internal):
	  avoid undefined behavior

	* test/openssl/test_pair.rb (test_write_zero): new test
	  [ruby-core:76751] [Bug #12660]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18 14:54:40 +00:00
nagachika 6d37aaab9a merge revision(s) 55797: [Backport #12645]
* ext/socket/option.c, ext/socket/rubysocket.h (inet_ntop): share
	  the fallback definition.  [ruby-core:76646] [Bug #12645]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-18 14:26:36 +00:00
nagachika 2f0555c3a1 merge revision(s) 55523: [Backport #12524]
* ext/digest/md5/md5ossl.h: Remove excess semicolons.
	  Suppress warning on Solaris with Oracle Solaris Studio 12.
	  [ruby-dev:49692] [Bug #12524]

	* ext/digest/md5/md5cc.h: ditto.

	* ext/digest/sha1/sha1cc.h: ditto.

	* ext/digest/sha1/sha1ossl.h: ditto.

	* ext/digest/sha2/sha2cc.h: ditto.

	* ext/digest/sha2/sha2ossl.h: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-16 03:13:24 +00:00
nagachika 38e722f741 merge revision(s) 55410: [Backport #12488]
* ext/date/date_strftime.c (date_strftime_with_tmx): reject too
	  large precision to get rid of buffer overflow.
	  reported by Guido Vranken <guido AT guidovranken.nl>.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:47:39 +00:00
nagachika 31dc77ae7f merge revision(s) 55047: [Backport #12441]
* ext/openssl/ossl_bn.c (try_convert_to_bnptr): Extracted from
	  GetBNPtr(). This doesn't raise exception but returns NULL on error.
	  (GetBNPtr): Raise TypeError if conversion fails.
	  (ossl_bn_eq): Implement BN#==.
	  (ossl_bn_eql): #eql? should not raise TypeError even if the argument
	  is not compatible with BN.
	  (ossl_bn_hash): Implement BN#hash.

	* ext/openssl/ossl_bn.c (Init_ossl_bn): Define #== and #hash.

	* test/openssl/test_bn.rb: Test BN#eql?, #== and #hash


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 19:06:03 +00:00
nagachika 243d224f28 merge revision(s) 55175: [Backport #12428]
* ext/openssl/ossl_pkey_dh.c (ossl_dh_compute_key): Check that the DH
	  has 'p' (the prime) before calling DH_size(). We can create a DH with
	  no parameter but DH_size() does not check and dereferences NULL.
	  [ruby-core:75720] [Bug #12428]

	* ext/openssl/ossl_pkey_dsa.c (ossl_dsa_sign): Ditto. DSA_size() does
	  not check dsa->q.

	* ext/openssl/ossl_pkey_rsa.c (ossl_rsa_public_encrypt,
	  ossl_rsa_public_decrypt, ossl_rsa_private_encrypt,
	  ossl_rsa_private_decrypt): Ditto. RSA_size() does not check rsa->n.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 18:49:32 +00:00
nagachika 686fbc8e5f merge revision(s) 55497,55498,55504: [Backport #11988]
* ext/psych/*, test/psych/*: Upate psych 2.1.0
	  This version fixed [Bug #11988][ruby-core:72850]

	* ext/psych/*, test/psych/*: Update psych 2.1.0


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55902 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-15 17:56:05 +00:00
nagachika 72e63983e6 merge revision(s) 55434: [Backport #12401]
* common.mk (build-ext), ext/extmk.rb: use variable EXTENCS
	  different than ENCOBJS, to get rid of circular dependency.
	  build libencs when linking encodings statically.
	  [ruby-core:75618] [Bug #12401]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 19:26:43 +00:00
nagachika 88d76cfdcd merge revision(s) 55100: [Backport #12292]
* ext/openssl/ossl_ssl.c (ossl_ssl_stop): Don't free the SSL struct
	  here. Since some methods such as SSLSocket#connect releases GVL,
	  there is a chance of use after free if we free the SSL from another
	  thread. SSLSocket#stop was documented as "prepares it for another
	  connection" so this is a slightly incompatible change. However when
	  this sentence was added (r30090, Add toplevel documentation for
	  OpenSSL, 2010-12-06), it didn't actually. The current behavior is
	  from r40304 (Correct shutdown behavior w.r.t GC., 2013-04-15).
	  [ruby-core:74978] [Bug #12292]

	* ext/openssl/lib/openssl/ssl.rb (sysclose): Update doc.

	* test/openssl/test_ssl.rb: Test this.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-11 17:58:25 +00:00
nagachika a3600fc377 merge revision(s) 55380: [Backport #12255]
* ext/json/lib/*.rb: Removed some comments. Because these are unnecessary
	  class description. [ci skip][Bug #12255][ruby-core:74835]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-10 16:30:43 +00:00
nagachika 1049e08aa7 merge revision(s) 55123,55129,55130,55133,55136: [Backport #12414]
* ext/bigdecimal/bigdecimal.c (GetVpValueWithPrec): consider
	  non-finite float values not to raise FloatDomainError.
	  [ruby-core:75682] [Bug #12414]

	* ext/bigdecimal/bigdecimal.c (isfinite): isfinite does not always
	  exist.  fixed build error on Windows introduced at r55123.

	* ext/bigdecimal/bigdecimal.c (isfinite): get rid of a warning on
	  cygwin. [Bug #12417][ruby-core:75691]

	* include/ruby/missing.h (isfinite): move from numeric.c.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-18 19:48:54 +00:00
nagachika 805e78248f merge revision(s) 54721: [Backport #12311]
* ext/date/date_core.c (Init_date_core): [DOC] Convert DateTime
	  documentation to RDoc from Markdown.
	  [ruby-core:75136] [Bug #12311]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@55399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-13 17:58:50 +00:00
nagachika 10685d4f71 merge revision(s) 53322,53323: [Backport #11880]
* ext/win32ole/win32ole.c (ole_vstr2wc, ole_variant2val): fix blank
	  string conversion. 
	  [Bug #11880]
	  Thanks Akio Tajima for the patch!
	  string conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-05 17:28:45 +00:00
nagachika 2d360c5e95 merge revision(s) 54755: [Backport #12313]
* encoding.c: Fix return value of `Encoding::ISO8859_1.name`
	  [Bug #12313][ruby-core:75147][ci skip]

	* ext/bigdecimal/bigdecimal.c: Fix code sample of `BigDecimal.new`


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-25 17:55:14 +00:00
nagachika 9224427bb5 merge revision(s) 54423,54489: [Backport #12201] [Backport #12202]
* ext/nkf/nkf-utf8/nkf.c: Merge upstream 4f3edf80a0.
	  patched by Anton Sivakov [Bug #12201] [Bug #12202]

	* ext/nkf/nkf-utf8/nkf.c (mime_putc): fix typo.
	  [Bug #12202] [ruby-core:74802]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@54714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-22 15:39:27 +00:00