[ruby-cvs:68473] mame:r61292 (trunk): random.c: make sure that Random.urandom returns required-length buffer

mame at ruby-lang.org mame at ruby-lang.org
Sat Dec 16 09:39:34 JST 2017


mame	2017-12-16 09:39:34 +0900 (Sat, 16 Dec 2017)

  New Revision: 61292

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

  Log:
    random.c: make sure that Random.urandom returns required-length buffer
    
    getrandom(2) and read(2) (from /dev/urandom) may return a random buffer
    whose length is shorter than required.  This change makes sure that they
    get enough buffer by using a loop.

  Modified files:
    trunk/random.c


More information about the ruby-cvs mailing list