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 | 7ccae4d15034fab87af687c38038669f614c2d3b (patch) | |
tree | 58f67f6a9c14639ff90a9e8a436856a6c3027cd3 /bignum.c | |
parent | 9ae31cc4857e1719c9291b3c1840c9cda11b5818 (diff) | |
download | ruby-7ccae4d15034fab87af687c38038669f614c2d3b.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)) { |