From 55c403b8febe02555c52bac7028cd6b1f006fad1 Mon Sep 17 00:00:00 2001 From: John Newbery Date: Wed, 15 Feb 2017 14:19:16 -0500 Subject: Ensure `-maxsigcachesize` is in valid range - If the -maxsigcachesize parameter is set to zero, setup a minimum sized sigcache (2 elements) rather than segfaulting. - Handle maxsigcachesize being negative - Handle maxsigcachesize being too large --- src/script/sigcache.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/script/sigcache.h') diff --git a/src/script/sigcache.h b/src/script/sigcache.h index c123a9ba0..238952bb9 100644 --- a/src/script/sigcache.h +++ b/src/script/sigcache.h @@ -14,6 +14,8 @@ // systems). Due to how we count cache size, actual memory usage is slightly // more (~32.25 MB) static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE = 32; +// Maximum sig cache size allowed +static const int64_t MAX_MAX_SIG_CACHE_SIZE = 16384; class CPubKey; -- cgit v1.2.3