Alan Wu 9dec4e8fc3
String#b: Don't depend on dependent string
Registering a string that depend on a dependent string as fstring
can lead to use-after-free. See c06ddfe and 3f95620 for details.

The following script triggers use-after-free on trunk, 2.4.6, 2.5.5
and 2.6.3. Credits to @wanabe for using eval as a cross-version way
of registering a fstring.

```ruby
a = ('j' * 24).b.b
eval('', binding, a)

p a
4.times { GC.start }
p a
```

 - string.c (str_replace_shared_without_enc): when given a
   dependent string, depend on the root of the dependent
   string.

[Bug #15934]
2019-06-18 12:18:13 +09:00
..
2019-04-15 02:05:03 +00:00
2019-06-04 19:00:48 +09:00
2019-05-04 23:32:13 +09:00
2019-05-23 00:07:16 -07:00
2019-06-07 18:57:58 +09:00
2019-06-08 00:14:58 +09:00
2019-01-25 06:35:04 +00:00
2019-01-08 07:45:04 +00:00
2019-04-09 23:03:40 +00:00