]> granicus.if.org Git - apache/commitdiff
Close a real GP fault. This is the _wrong_solution_, but stops the
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 29 Dec 2001 05:02:10 +0000 (05:02 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sat, 29 Dec 2001 05:02:10 +0000 (05:02 +0000)
  segfaults against very odd RAND_seed errors given garbage in.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92646 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_rand.c

index 7b41ae0ef92167e4a3f0a3e34f2b7aec8377a517..472a4be7c5b108cddbff93095c26dbe519155cef 100644 (file)
@@ -149,14 +149,18 @@ int ssl_rand_seed(server_rec *s, apr_pool_t *p, ssl_rsctx_t nCtx, char *prefix)
                 RAND_seed(stackdata+n, 128);
                 nDone += 128;
 
+#if XXX_SBENTROPY_SOLVED
                 /*
+                 * XXX: This is entirely borked, SCOREBOARD_SIZE < 1024
+                 *
                  * seed in an 1KB extract of the current scoreboard
                  */
                 if (ap_scoreboard_image != NULL) {
                     n = ssl_rand_choosenum(0, SCOREBOARD_SIZE-1024-1);
-                    RAND_seed((unsigned char *)ap_scoreboard_image+n, 1024);
+                    RAND_seed(((unsigned char *)ap_scoreboard_image)+n, 1024);
                     nDone += 1024;
                 }
+#endif
             }
         }
     }