diff options
author | marha <marha@users.sourceforge.net> | 2015-04-20 22:51:55 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2015-04-20 22:53:07 +0200 |
commit | 2a00e489122f6c4b525090dbdba2855a2ea2d519 (patch) | |
tree | 815e5c842bccb2bc6eb4b2934ef618fe32b820ca /openssl/apps/s_time.c | |
parent | 4ba9be2882d9f1567809edb0a31fcdf11320d41f (diff) | |
download | vcxsrv-2a00e489122f6c4b525090dbdba2855a2ea2d519.tar.gz vcxsrv-2a00e489122f6c4b525090dbdba2855a2ea2d519.tar.bz2 vcxsrv-2a00e489122f6c4b525090dbdba2855a2ea2d519.zip |
Upgraded to openssl 1.0.2a
Diffstat (limited to 'openssl/apps/s_time.c')
-rw-r--r-- | openssl/apps/s_time.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openssl/apps/s_time.c b/openssl/apps/s_time.c index 5846f3ae1..a40997a22 100644 --- a/openssl/apps/s_time.c +++ b/openssl/apps/s_time.c @@ -302,6 +302,10 @@ static int parseArgs(int argc, char **argv) if (--argc < 1) goto bad; maxTime = atoi(*(++argv)); + if(maxTime <= 0) { + BIO_printf(bio_err, "time must be > 0\n"); + badop = 1; + } } else { BIO_printf(bio_err, "unknown option %s\n", *argv); badop = 1; @@ -550,7 +554,8 @@ int MAIN(int argc, char **argv) nConn, totalTime, ((double)nConn / totalTime), bytes_read); printf ("%d connections in %ld real seconds, %ld bytes read per connection\n", - nConn, (long)time(NULL) - finishtime + maxTime, bytes_read / nConn); + nConn, (long)time(NULL) - finishtime + maxTime, + bytes_read / (nConn?nConn:1)); ret = 0; end: |