[openssl-commits] [openssl] master update
Rich Salz
rsalz at openssl.org
Wed Aug 16 14:06:14 UTC 2017
The branch master has been updated
via 61389f0981b4e30247f2cb9828e4a0e0fc55f7a6 (commit)
from 64bf10167b914bac04a19f9afee381d75fcd670a (commit)
- Log -----------------------------------------------------------------
commit 61389f0981b4e30247f2cb9828e4a0e0fc55f7a6
Author: gbrl <gbrl at google.com>
Date: Tue Aug 8 15:17:01 2017 +0200
bndiv fuzzer: limit the size of the input to avoid timeout
CLA: trivial
Reviewed-by: Emilia Käsper <emilia at openssl.org>
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4119)
-----------------------------------------------------------------------
Summary of changes:
fuzz/bndiv.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fuzz/bndiv.c b/fuzz/bndiv.c
index 30d8448..e9c70bb 100644
--- a/fuzz/bndiv.c
+++ b/fuzz/bndiv.c
@@ -18,6 +18,9 @@
#include <openssl/err.h>
#include "fuzzer.h"
+/* 256 kB */
+#define MAX_LEN (256 * 1000)
+
static BN_CTX *ctx;
static BIGNUM *b1;
static BIGNUM *b2;
@@ -47,6 +50,10 @@ int FuzzerTestOneInput(const uint8_t *buf, size_t len)
/* s1 and s2 will be the signs for b1 and b2. */
int s1 = 0, s2 = 0;
+ /* limit the size of the input to avoid timeout */
+ if (len > MAX_LEN)
+ len = MAX_LEN;
+
/* We are going to split the buffer in two, sizes l1 and l2, giving b1 and
* b2.
*/
More information about the openssl-commits
mailing list