[前][次][番号順一覧][スレッド一覧]

ruby-changes:45196

From: nobu <ko1@a...>
Date: Thu, 5 Jan 2017 16:27:23 +0900 (JST)
Subject: [ruby-changes:45196] nobu:r57269 (trunk): bignum.c: fix rb_cstr_parse_inum endp

nobu	2017-01-05 16:27:18 +0900 (Thu, 05 Jan 2017)

  New Revision: 57269

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57269

  Log:
    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.

  Modified files:
    trunk/bignum.c
Index: bignum.c
===================================================================
--- bignum.c	(revision 57268)
+++ bignum.c	(revision 57269)
@@ -4172,6 +4172,7 @@ rb_cstr_parse_inum(const char *str, ssiz https://github.com/ruby/ruby/blob/trunk/bignum.c#L4172
     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)) {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]