Sparse array limit testing: reduce the range limit for the number of bits
authorPauli <paul.dale@oracle.com>
Wed, 13 Feb 2019 06:11:16 +0000 (16:11 +1000)
committerPauli <paul.dale@oracle.com>
Wed, 13 Feb 2019 09:01:49 +0000 (19:01 +1000)
in a sparse array pointer block.

Reviewed-by: Tim Hudson <tjh@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8221)

crypto/sparse_array.c

index 9255f9da3f4bfa29d042c5c93a6787c178c54ee3..8c9efed0ebf83cd2412eaf9d2296a06a6d471630 100644 (file)
@@ -37,7 +37,7 @@
 # else
 #  define OPENSSL_SA_BLOCK_BITS           12
 # endif
-#elif OPENSSL_SA_BLOCK_BITS < 2 || OPENSSL_SA_BLOCK_BITS > BN_BITS2
+#elif OPENSSL_SA_BLOCK_BITS < 2 || OPENSSL_SA_BLOCK_BITS > (BN_BITS2 - 1)
 # error OPENSSL_SA_BLOCK_BITS is out of range
 #endif