diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-05 07:27:18 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-05 07:27:18 +0000 |
commit | f2f94c95a24b88cba856258e21dd1ab6fd57fc07 (patch) | |
tree | 58f67f6a9c14639ff90a9e8a436856a6c3027cd3 /bignum.c | |
parent | ac1a2253ffe7dddc6a1d88c161de3bbccbaf29cb (diff) | |
download | ruby-f2f94c95a24b88cba856258e21dd1ab6fd57fc07.tar.gz |
bignum.c: fix rb_cstr_parse_inum endp
* bignum.c (rb_cstr_parse_inum): stores the address of the first
invalid character when str is too big or contains an underscore.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -4172,6 +4172,7 @@ rb_cstr_parse_inum(const char *str, ssize_t len, char **endp, int base) digits_start = str; if (!str2big_scan_digits(s, str, base, badcheck, &num_digits, &len)) goto bad; + if (endp) *endp = (char *)(str + len); digits_end = digits_start + len; if (POW2_P(base)) { |