Changeset b8c1216a38d25e7d261119af30bff6ad21b5c032
- 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
| r256a65b |
rb8c1216 |
|
| 33 | 33 | #include <vlc_url.h> |
|---|
| 34 | 34 | #include <vlc_network.h> |
|---|
| | 35 | #include <vlc_rand.h> |
|---|
| 35 | 36 | #include <assert.h> |
|---|
| 36 | 37 | #include <errno.h> |
|---|
| … | … | |
| 249 | 250 | |
|---|
| 250 | 251 | s->stream = rtsp; |
|---|
| 251 | | s->id = rand(); /* FIXME: not enough entropy */ |
|---|
| | 252 | vlc_rand_bytes (&s->id, sizeof (s->id)); |
|---|
| 252 | 253 | s->trackc = 0; |
|---|
| 253 | 254 | s->trackv = NULL; |
|---|