diff --git a/libfreerdp/core/test/TestConnect.c b/libfreerdp/core/test/TestConnect.c index cd2b01847..3a109052a 100644 --- a/libfreerdp/core/test/TestConnect.c +++ b/libfreerdp/core/test/TestConnect.c @@ -1,5 +1,6 @@ #include #include +#include #include #include @@ -275,7 +276,9 @@ static int testSuccess(int port) int TestConnect(int argc, char* argv[]) { int randomPort; - randomPort = 3389 + (random() % 200); + int random; + winpr_RAND((BYTE*)&random, sizeof(random)); + randomPort = 3389 + (random % 200); /* Test connect to not existing server, * check if timeout is honored. */