BUG: glibc-2.5.1-arc4_prng-2.patch breaks strfry

mordae at anilinux.org mordae at anilinux.org
Mon May 5 22:30:47 PDT 2008


Robert Connolly writes:

> I think I have a fix that should prevent me from kicking myself in the butt, 
> again:
> 
> --- string/strfry.c.orig	2008-05-05 23:56:08.000000000 +0000
> +++ string/strfry.c	2008-05-05 23:58:05.000000000 +0000
> @@ -32,7 +32,7 @@
>      {
>        static char state[32];
>        rdata.state = NULL;
> -      __initstate_r (time ((time_t *) NULL) ^ getpid (),
> +      __initstate_r (arc4random(),
>  		     state, sizeof (state), &rdata);
>        init = 1;
>      }

I don't have compiled HLFS by hand (I'm packaging it and don't even have
/tools), but at first glance it seems good. initstate takes int as first
argument, so types should be okay too.

See ya



More information about the hlfs-dev mailing list