Changeset b8c1216a38d25e7d261119af30bff6ad21b5c032

Show
Ignore:
Timestamp:
09/01/07 19:34:39 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1188668079 +0000
git-parent:

[b5d134fcb108cf6721d2ed06131961ae132675d0]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1188668079 +0000
Message:

Improve randomness of RTSP session ID.
Now it should not be possible to guess other people's ID.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/stream_out/rtsp.c

    r256a65b rb8c1216  
    3333#include <vlc_url.h> 
    3434#include <vlc_network.h> 
     35#include <vlc_rand.h> 
    3536#include <assert.h> 
    3637#include <errno.h> 
     
    249250 
    250251    s->stream = rtsp; 
    251     s->id = rand(); /* FIXME: not enough entropy */ 
     252    vlc_rand_bytes (&s->id, sizeof (s->id)); 
    252253    s->trackc = 0; 
    253254    s->trackv = NULL;