SSH CRC attack detector now uses a dynamically allocated context.
[u/mdw/putty] / noise.c
diff --git a/noise.c b/noise.c
index 856974b..141f111 100644 (file)
--- a/noise.c
+++ b/noise.c
@@ -53,8 +53,10 @@ void random_save_seed(void)
     int len;
     void *data;
 
-    random_get_savedata(&data, &len);
-    write_random_seed(data, len);
+    if (random_active) {
+       random_get_savedata(&data, &len);
+       write_random_seed(data, len);
+    }
 }
 
 /*
@@ -127,7 +129,7 @@ void noise_regular(void)
  * counter to the noise pool. It gets the scan code or mouse
  * position passed in.
  */
-void noise_ultralight(DWORD data)
+void noise_ultralight(unsigned long data)
 {
     DWORD wintime;
     LARGE_INTEGER perftime;