[FFmpeg-devel] [PATCH] change the order of params for av_init_random()

Michael Niedermayer michaelni
Mon Jan 5 19:36:11 CET 2009


On Mon, Jan 05, 2009 at 05:32:50PM +0100, Stefano Sabatini wrote:
> On date Monday 2009-01-05 17:00:50 +0100, Michael Niedermayer encoded:
> > On Mon, Jan 05, 2009 at 02:44:34AM +0100, Stefano Sabatini wrote:
> > [...]
> > > Index: ffmpeg/ffserver.c
> > > ===================================================================
> > > --- ffmpeg.orig/ffserver.c	2009-01-05 02:40:48.000000000 +0100
> > > +++ ffmpeg/ffserver.c	2009-01-05 02:41:00.000000000 +0100
> > > @@ -4483,7 +4483,7 @@
> > >  
> > >      unsetenv("http_proxy");             /* Kill the http_proxy */
> > >  
> > > -    av_init_random(av_gettime() + (getpid() << 16), &random_state);
> > > +    av_random_init(&random_state, av_gettime() + (getpid() << 16));
> > >  
> > >      memset(&sigact, 0, sizeof(sigact));
> > >      sigact.sa_handler = handle_child_exit;
> > 
> > do we really have to export the pid and starttime to an attacker?
> 
> Would be this more acceptable?

open /dev/random/
read into the seed
if either fails use 0.
thats IMHO ... iam not ffserver maintainer, and dont even know why ffserver
needs random numbers.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090105/0d656776/attachment.pgp>



More information about the ffmpeg-devel mailing list