From 2a00e489122f6c4b525090dbdba2855a2ea2d519 Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 20 Apr 2015 22:51:55 +0200 Subject: Upgraded to openssl 1.0.2a --- openssl/apps/s_time.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'openssl/apps/s_time.c') 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: -- cgit v1.2.3