diff options
| author | jsorg71 <jsorg71> | 2007-06-07 22:17:26 +0000 |
|---|---|---|
| committer | jsorg71 <jsorg71> | 2007-06-07 22:17:26 +0000 |
| commit | 411d7deaf5fca14b8fcac9ff70a44e9eb37faadf (patch) | |
| tree | 381a4aec99c13adad12ebe89284ca0164b0f5ba6 | |
| parent | bb88a8285faa8c2a140a24c531742da128549a5a (diff) | |
| download | xrdp-proprietary-411d7deaf5fca14b8fcac9ff70a44e9eb37faadf.tar.gz xrdp-proprietary-411d7deaf5fca14b8fcac9ff70a44e9eb37faadf.zip | |
improve win32 random
| -rw-r--r-- | common/os_calls.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/os_calls.c b/common/os_calls.c index 9bb5ef1f..a66722c4 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -558,7 +558,14 @@ void APP_CC g_random(char* data, int len) { #if defined(_WIN32) - memset(data, 0x44, len); + int index; + + srand(g_time1()); + for (index = 0; index < len; index++) + { + data[index] = (char)rand(); /* rand returns a number between 0 and + RAND_MAX */ + } #else int fd; |
