Commit Graph

7663 Commits

Author SHA1 Message Date
Yukihiro "Matz" Matsumoto a10f85f855 Merge pull request #3369 from ksss/fix-str-prepend
Rewrite String#prepend with Ruby
2017-01-05 17:40:38 +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
ksss eeca6ec8f5 Rewrite String#prepend with Ruby
Fix #3357
2017-01-04 14:00:28 +09:00
Yukihiro "Matz" Matsumoto bc1259de3b add explicit casts 2017-01-02 17:48:44 +09:00
Yukihiro "Matz" Matsumoto f388b6d612 use size_t instead of int 2017-01-02 17:48:44 +09:00
Yukihiro "Matz" Matsumoto 158a6ab2ed Merge pull request #3367 from ksss/str-modify
Fix segv on str_buf_cat
2017-01-02 17:48:27 +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 07167b8f5e Initialize potentially uninitialized variable tsec. 2017-01-01 00:47:45 +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 803bf010ca save/restore arena index around yield; ref #3359 2016-12-28 13:00:28 +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
Yukihiro "Matz" Matsumoto 30d5424adf Merge pull request #3365 from ksss/freeze
Fix segv when primitive value
2016-12-26 18:12:44 +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
Yukihiro "Matz" Matsumoto ede04d68b3 Merge pull request #3363 from ksss/string
Do nothing when empty string
2016-12-25 00:43:01 +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 5e3077c00d One less argument for raisef(); fix #3355
This issue was reported by https://hackerone.com/mg36
2016-12-21 16:46:26 +09:00
Yukihiro "Matz" Matsumoto 987daa64e3 Merge pull request #3358 from takjn/add-example-rx630
Added example for cross-compiling on Renesas RX630
2016-12-21 04:03:34 +09:00
Jun Takeda 76eb7147a4 Added example for cross-compiling for Renesas RX630 2016-12-21 00:51:18 +09:00
Yukihiro "Matz" Matsumoto 432570723d Check if width is zero or negative before fill; fix #3347
Reported by https://hackerone.com/haquaman.
2016-12-18 02:02:30 +09:00
Yukihiro "Matz" Matsumoto 2edf15bed8 Prohibit mixture of posarg and nextarg; ref #3347 2016-12-18 02:02:30 +09:00
Yukihiro "Matz" Matsumoto 9781f7f0ea Add "not reached" mark in mrb_ary_concat() 2016-12-18 02:02:30 +09:00
Yukihiro "Matz" Matsumoto c2bbfa5b61 NODE_NEGATE cdr may not be code-node; fix #3348 ref #3324
Reported by Denis Kasak https://hackerone.com/dkasak
2016-12-18 02:02:30 +09:00
Yukihiro "Matz" Matsumoto b0886d5692 Zero length heredoc still crashed; ref Shopify/mruby-internal#81 2016-12-18 02:02:30 +09:00
Yukihiro "Matz" Matsumoto 5289b4ba11 Merge pull request #3346 from clayton-shopify/fix-float-read
Fix crash when exponent is -2147483648
2016-12-17 12:18:35 +09:00
Clayton Smith 868d2e528f Fix crash when exponent is -2147483648 2016-12-15 09:36:22 -05:00
Yukihiro "Matz" Matsumoto 73cc08772f remove debug code; ref #3344 2016-12-14 13:34:24 +09:00
Yukihiro "Matz" Matsumoto eb2a52ac98 Merge pull request #3345 from clayton-shopify/fix-range-beg-len
Check type before calling mrb_range_ptr.
2016-12-14 01:19:49 +09:00
Clayton Smith 73ad7395c0 Check type before calling mrb_range_ptr. 2016-12-13 10:04:15 -05:00
Yukihiro "Matz" Matsumoto fead715cef tLABEL should not come after conditional ternary; fix #3344 2016-12-13 23:44:10 +09:00
Yukihiro "Matz" Matsumoto df35076602 Restore callinfo offset in mrb_yield_with_class() 2016-12-13 17:17:47 +09:00
Yukihiro "Matz" Matsumoto d196e4dd04 void_expr_error(): n may be NULL.
Reported from @clayton-shopify.
2016-12-13 11:18:05 +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 647ad29a7a Fixed wrong condition in new_sym() that breaks symbol data. 2016-12-13 02:33:28 +09:00
Yukihiro "Matz" Matsumoto a4ae22ae0c Failed to realloc irep->syms in certain condition.
Also msym size changed to 512 from 256.
2016-12-13 01:55:08 +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 6ac5473494 Merge pull request #3341 from kou/support-pkg-config-in-mrbgem-rake
Support pkg-config in mrbgem.rake
2016-12-12 01:07:27 +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
Yukihiro "Matz" Matsumoto 1fbad32f8b Merge pull request #3340 from k0kubun/object-freeze
Implement Object#freeze
2016-12-12 00:49:23 +09:00