Commit 45d31919 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

! It did say NON-PREDICTIBLE at the top of the file, didn't it?

parent 29b9c7e1
...@@ -116,9 +116,7 @@ void vlc_rand_bytes (void *buf, size_t len) ...@@ -116,9 +116,7 @@ void vlc_rand_bytes (void *buf, size_t len)
} }
#else /* WIN32 */ #else /* WIN32 */
/* It would be better to use rand_s() instead of rand() but it's not possible #define _CRT_RAND_S
* while we support Win 2OOO and until it gets included in mingw */
/* #define _CRT_RAND_S*/
#include <stdlib.h> #include <stdlib.h>
void vlc_rand_bytes (void *buf, size_t len) void vlc_rand_bytes (void *buf, size_t len)
...@@ -126,8 +124,11 @@ void vlc_rand_bytes (void *buf, size_t len) ...@@ -126,8 +124,11 @@ void vlc_rand_bytes (void *buf, size_t len)
while (len > 0) while (len > 0)
{ {
unsigned int val; unsigned int val;
/*rand_s (&val);*/ #if 0
val = rand(); rand_s (&val);
#else
abort();
#endif
if (len < sizeof (val)) if (len < sizeof (val))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment