+ if (tmp->open ("/dev/random", "r") && tmp->stat()->ischr) {
+ if (Stdio.Stat s = file_stat("/dev/urandom"))
+ if (s->ischr)
+ factor = 1;Won't this crash if /dev/urandom doesn't exist (s==0)?
Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum Fri, 05 Sep 2008 08:55:20 -0700
+ if (tmp->open ("/dev/random", "r") && tmp->stat()->ischr) {
+ if (Stdio.Stat s = file_stat("/dev/urandom"))
+ if (s->ischr)
+ factor = 1;Won't this crash if /dev/urandom doesn't exist (s==0)?