[ruby-cvs:67792] rhe:r60611 (trunk): bignum.c: avoid use of uninitialized value in Integer.sqrt

rhe at ruby-lang.org rhe at ruby-lang.org
Thu Nov 2 15:30:20 JST 2017


rhe	2017-11-02 15:30:18 +0900 (Thu, 02 Nov 2017)

  New Revision: 60611

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

  Log:
    bignum.c: avoid use of uninitialized value in Integer.sqrt
    
    This is a follow-up fix to r57713. estimate_initial_sqrt() didn't
    initialize BDIGITs except the topmost two, letting Integer.sqrt return
    wrong result in the fast path, such as for (1<<504).

  Modified files:
    trunk/bignum.c


More information about the ruby-cvs mailing list