Yukihiro "Matz" Matsumoto
392d7fbef9
Add ary_modify() checks; close #3379
...
This issue was reported by https://hackerone.com/an0n-j
2017-01-07 12:26:29 +09:00
Yukihiro "Matz" Matsumoto
8c11b04d5c
Merge pull request #3377 from ksss/respond_to
...
Check intern object returned by mrb_check_string_type
2017-01-06 18:56:39 +09:00
ksss
ddcb30d84b
Check intern object returned by mrb_check_string_type
2017-01-06 16:27:19 +09:00
Yukihiro "Matz" Matsumoto
885d929398
Improve capacity enhancing conditions
2017-01-06 14:53:00 +09:00
Yukihiro "Matz" Matsumoto
c6a1172592
Add pointer cast to pacify warnings.
2017-01-06 14:52:04 +09:00
Yukihiro "Matz" Matsumoto
9a76a0bd80
Move mrb_assert() position.
2017-01-06 14:51:21 +09:00
Yukihiro "Matz" Matsumoto
f53f73f30c
Should not deallocate shared string referring static; fix #3373
2017-01-06 14:25:01 +09:00
Yukihiro "Matz" Matsumoto
36f5b44578
Add new method Kernel#frozen?; ref #3370
2017-01-05 17:49:21 +09:00
Yukihiro "Matz" Matsumoto
2e0c2b5807
Add mrb_hash_modify() to Hash#{delete,clear}; ref #3370
...
This issue was reported by https://hackerone.com/an0n-j
2017-01-05 16:46:08 +09:00
Yukihiro "Matz" Matsumoto
f388b6d612
use size_t instead of int
2017-01-02 17:48:44 +09:00
ksss
8a9a24152a
Fix memory error on str_buf_cat
...
Modify from nofree to embed string
2017-01-02 17:32:44 +09:00
ksss
30b6648b9c
Small refactoring: should use RSTR_CAPA
2017-01-02 16:33:58 +09:00
Yukihiro "Matz" Matsumoto
8b77979667
Initialize potentially uninitialized variable z
2017-01-01 00:45:14 +09:00
Yukihiro "Matz" Matsumoto
1ed4de58d0
str_buf_cat(): better size check added; ref #3342
2016-12-31 23:33:34 +09:00
Yukihiro "Matz" Matsumoto
342b1de65c
str_buf_cat(): should allocate at least RSTRING_EMBED_LEN_MAX+1.
2016-12-31 23:31:45 +09:00
Yukihiro "Matz" Matsumoto
cfdd1e3cc6
ary_expand_capa(): refine conditions to avoid infinite loop; ref #3353
2016-12-31 23:22:17 +09:00
Yukihiro "Matz" Matsumoto
9d84f0d47b
ary_expand_capa(): size calculation by size_t; fix #3353
...
Also more size checks added.
2016-12-31 23:09:56 +09:00
Yukihiro "Matz" Matsumoto
270ea41b37
method_missing() may have CALL_MAXARGS-1 arguments; fix #3351
...
The issue was reported by https://hackerone.com/ston3
2016-12-30 22:09:32 +09:00
Yukihiro "Matz" Matsumoto
6af8cc36b9
Merge pull request #3366 from ksss/splice
...
Check array max size
2016-12-28 13:00:14 +09:00
ksss
caba1a19dc
Check array max size
...
Fix #3354
2016-12-27 15:48:53 +09:00
ksss
5c1c002ac2
Fix segv when primitive value
...
Fix #3352
2016-12-25 16:52:10 +09:00
Yukihiro "Matz" Matsumoto
000a3119ca
Merge pull request #3364 from ksss/string2
...
Check overflow string length
2016-12-25 01:35:44 +09:00
ksss
c626b823ca
Check overflow string length
...
Fix #3360
2016-12-23 23:31:21 +09:00
ksss
0de65a88d4
Do nothing when empty string
...
Fix #3361
2016-12-23 23:13:23 +09:00
Yukihiro "Matz" Matsumoto
9781f7f0ea
Add "not reached" mark in mrb_ary_concat()
2016-12-18 02:02:30 +09:00
Clayton Smith
868d2e528f
Fix crash when exponent is -2147483648
2016-12-15 09:36:22 -05:00
Clayton Smith
73ad7395c0
Check type before calling mrb_range_ptr.
2016-12-13 10:04:15 -05:00
Yukihiro "Matz" Matsumoto
df35076602
Restore callinfo offset in mrb_yield_with_class()
2016-12-13 17:17:47 +09:00
Yukihiro "Matz" Matsumoto
3bedd22d55
Add assertion to make sure new capacity does not overflow.
2016-12-13 10:50:04 +09:00
Yukihiro "Matz" Matsumoto
3a7c369536
Make sure str->capa is under MRB_INT_MAX; fix #3342
2016-12-13 10:48:36 +09:00
Yukihiro "Matz" Matsumoto
9cef265402
should not try to set classpath for frozen classes; ref #3340
2016-12-12 10:34:21 +09:00
Yukihiro "Matz" Matsumoto
1164463a7c
freeze classes/modules; ref #3340
2016-12-12 01:05:07 +09:00
Yukihiro "Matz" Matsumoto
761562b65f
freeze instance variables; ref #3340
2016-12-12 01:00:24 +09:00
Yukihiro "Matz" Matsumoto
92c843dd07
rename prefix RBASIC_ to MRB_; ref #3340
2016-12-12 00:54:36 +09:00
Takashi Kokubun
10bb7ad693
Implement Object#freeze
2016-12-11 03:44:15 +09:00
Yukihiro "Matz" Matsumoto
3cc913490b
Merge pull request #3329 from bouk/reuse
...
Mark all the built-in classes during GC sweep
2016-12-10 16:02:47 +09:00
Yukihiro "Matz" Matsumoto
0af170fbec
gc.c: dead_slot is boolean; ref #3339
2016-12-10 15:34:32 +09:00
Kazuho Oku
2ef634edb5
do not destroy a page with an active TT_ENV (e.g. an env referred from TT_FIBER)
2016-12-10 15:11:07 +09:00
Felix Jones
2827655b9c
Removed unnecessary const macro - const keyword is already a dependency
2016-12-08 12:38:00 +00:00
Yasuhiro Matsumoto
c27dbfedf4
disable define const on VS
2016-12-08 15:56:50 +09:00
Yasuhiro Matsumoto
eda6c1dc05
fix build on vs2013-vs2015
2016-12-08 15:38:19 +09:00
Kazuho Oku
c2e749f878
fix issues of mrb_gc_unregister introduced in 09b1185
...
* fixes partial copy of objects in GC root array (due to missing `* sizeof(mrb_value)`)
* restores the behavior that permitted an unregistered object to be used as an argument
2016-12-08 10:27:07 +09:00
Bouke van der Bijl
f7a891fa89
Mark all the built-in classes during GC sweep
...
Reported by https://hackerone.com/haquaman
2016-12-07 15:14:12 -05:00
Yukihiro "Matz" Matsumoto
5930a6ebc7
Merge pull request #3328 from shugo/hash-dup-default_proc
...
Copy default_proc by Hash#dup.
2016-12-08 01:04:25 +09:00
Felix Jones
fe86cf4c91
Removed the errno declaration from string.c
2016-12-07 14:17:09 +00:00
Shugo Maeda
338e0ff52d
Copy default_proc by Hash#dup.
2016-12-07 22:39:20 +09:00
Felix Jones
6187c21bd9
Wrapped string.c errno with ifndef macro for platforms that use inbuilt errno macro
2016-12-07 12:46:47 +00:00
Yukihiro "Matz" Matsumoto
dffb4d82dc
Add type check for cls before allocation
2016-12-06 11:40:49 +09:00
Yukihiro "Matz" Matsumoto
6ec14a2173
Merge pull request #3318 from bouk/splat-stack
...
Fix stack move segfaulting in OP_ARYCAT
2016-12-05 16:51:46 +09:00
Yukihiro "Matz" Matsumoto
ac561a52f5
Add symbol type check for Module#undef_method
2016-12-04 10:41:01 +09:00