aboutsummaryrefslogtreecommitdiffstats
path: root/random.c
diff options
context:
space:
mode:
Diffstat (limited to 'random.c')
-rw-r--r--random.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/random.c b/random.c
index 2da40b2bb6..333c593ff5 100644
--- a/random.c
+++ b/random.c
@@ -489,7 +489,9 @@ fill_random_seed(unsigned int seed[DEFAULT_SEED_CNT])
#endif
)) >= 0) {
if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) {
- (void)read(fd, seed, DEFAULT_SEED_LEN);
+ if (read(fd, seed, DEFAULT_SEED_LEN) < DEFAULT_SEED_LEN) {
+ /* abandon */;
+ }
}
close(fd);
}