to speed up mksh, get rid of arc4random(3) uses and use the LCG always;
depend on ASLR for seeding
This commit is contained in:
5
misc.c
5
misc.c
@ -29,7 +29,7 @@
|
||||
#include <grp.h>
|
||||
#endif
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.138 2010/01/29 09:34:29 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.139 2010/07/04 17:33:55 tg Exp $");
|
||||
|
||||
unsigned char chtypes[UCHAR_MAX + 1]; /* type bits for unsigned char */
|
||||
|
||||
@ -1266,6 +1266,9 @@ chvt(const char *fn)
|
||||
struct stat sb;
|
||||
int fd;
|
||||
|
||||
/* for entropy */
|
||||
kshstate_f.h = evilhash(fn);
|
||||
|
||||
if (*fn == '-') {
|
||||
memcpy(dv, "-/dev/null", sizeof("-/dev/null"));
|
||||
fn = dv + 1;
|
||||
|
Reference in New Issue
Block a user