[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Apr 6 08:11:28 UTC 2016


The branch master has been updated
       via  570c0716e30ca3490cc8f5d8d7cf25bcd99d6c7c (commit)
      from  69853045e1154236d440eba363a001033f5e3781 (commit)


- Log -----------------------------------------------------------------
commit 570c0716e30ca3490cc8f5d8d7cf25bcd99d6c7c
Author: Andrea Grandi <andrea.grandi at intel.com>
Date:   Fri Mar 25 04:19:30 2016 +0000

    Add a check of the FD_SETSIZE before the call to select()
    
    Reviewed-by: Kurt Roeckx <kurt at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 apps/speed.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/apps/speed.c b/apps/speed.c
index 409f3a9..b3f477e 100644
--- a/apps/speed.c
+++ b/apps/speed.c
@@ -1174,6 +1174,16 @@ static int run_benchmark(int async_jobs, int (*loop_function)(void *), loopargs_
                 max_fd = job_fd;
         }
 
+        if (max_fd >= FD_SETSIZE) {
+            BIO_printf(bio_err,
+                    "Error: max_fd (%d) must be smaller than FD_SETSIZE (%d). "
+                    "Decrease the value of async_jobs\n",
+                    max_fd, FD_SETSIZE);
+            ERR_print_errors(bio_err);
+            error = 1;
+            break;
+        }
+
         select_result = select(max_fd + 1, &waitfdset, NULL, NULL, NULL);
         if (select_result == -1 && errno == EINTR)
             continue;


More information about the openssl-commits mailing list