Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2016 14:53:32 -0500
From:      Pedro Giffuni <pfg@FreeBSD.org>
To:        Ed Schouten <ed@nuxi.nl>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r300322 - head/bin/ed
Message-ID:  <1555e0da-830b-d06b-080b-a8176a7db67d@FreeBSD.org>
In-Reply-To: <CABh_MKmzzUD3M%2BwB_5A194QP5Q5LcVG6yJ=wFDrRo4Swf7uMHQ@mail.gmail.com>
References:  <201605201910.u4KJAT13015624@repo.freebsd.org> <CABh_MKmzzUD3M%2BwB_5A194QP5Q5LcVG6yJ=wFDrRo4Swf7uMHQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help


On 05/20/16 14:31, Ed Schouten wrote:
> 2016-05-20 21:10 GMT+02:00 Pedro F. Giffuni <pfg@freebsd.org>:
>>         /* initialize the padding vector */
>>         for (i = 0; i < 8; i++)
>> -               pvec[i] = (char) (arc4random() % 256);
>> +               pvec[i] = (char)arc4random_uniform(256);
>
> This could be simplified to just calling arc4random_buf() on pvec, right?
>

Hmm ... Yes.

FWIW, ed(1) needs a bunch of cleanups. OpenBSD removed the DES code 
altogether.

Pedro.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1555e0da-830b-d06b-080b-a8176a7db67d>