svn commit: r300322 - head/bin/ed

Pedro Giffuni pfg at FreeBSD.org
Fri May 20 19:53:24 UTC 2016



On 05/20/16 14:31, Ed Schouten wrote:
> 2016-05-20 21:10 GMT+02:00 Pedro F. Giffuni <pfg at 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.


More information about the svn-src-all mailing list