Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 307983
Collapse All | Expand All

(-)work/mksh/arc4random.c (-8 / +1 lines)
Lines 367-380 arc4_writeback(uint8_t *buf, size_t len, Link Here
367
	memcpy(buf, &num, sizeof (num));
367
	memcpy(buf, &num, sizeof (num));
368
	return (do_rd ? 0 : 1);
368
	return (do_rd ? 0 : 1);
369
#else
369
#else
370
	int fd;
370
	return (0);
371
372
	if ((fd = open(__randomdev, O_WRONLY)) != -1) {
373
		if (write(fd, buf, len) < 4)
374
			do_rd = 1;
375
		close(fd);
376
	}
377
	return (do_rd || fd == -1 ? 0 : 1);
378
#endif
371
#endif
379
}
372
}
380
373

Return to bug 307983