diff options
author | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-03-04 17:06:42 +0000 |
---|---|---|
committer | Geoffrey Washburn <geoffrey.washburn@epfl.ch> | 2008-03-04 17:06:42 +0000 |
commit | 5ab72025a789ea9ada209cb7656b913186bb209a (patch) | |
tree | 4c4782b163e04489a3bac990b346a130344044e2 /src | |
parent | 9aacd6ddc4804b18498b8d1bdc702ef8682e731d (diff) | |
download | scala-5ab72025a789ea9ada209cb7656b913186bb209a.tar.gz scala-5ab72025a789ea9ada209cb7656b913186bb209a.tar.bz2 scala-5ab72025a789ea9ada209cb7656b913186bb209a.zip |
Use a java.security.SecureRandom for better
random port selection. Should think a little
more about whether fsc can be exploited
by other users local to a computer.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/CompileSocket.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/CompileSocket.scala b/src/compiler/scala/tools/nsc/CompileSocket.scala index 092c300ae5..bb01655709 100644 --- a/src/compiler/scala/tools/nsc/CompileSocket.scala +++ b/src/compiler/scala/tools/nsc/CompileSocket.scala @@ -180,7 +180,7 @@ class CompileSocket { def setPort(port: Int) { try { val f = new PrintWriter(new FileOutputStream(portFile(port))) - f.println(new java.util.Random().nextInt.toString) + f.println(new java.security.SecureRandom().nextInt.toString) f.close() } catch { case ex: /*FileNotFound+Security*/Exception => |