Fix Coverity 1493746: constant expression result
authorPauli <pauli@openssl.org>
Sun, 14 Nov 2021 22:35:27 +0000 (08:35 +1000)
committerPauli <pauli@openssl.org>
Tue, 16 Nov 2021 22:15:35 +0000 (08:15 +1000)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17034)

crypto/stack/stack.c

index c06af85e33ff75b279f2cb72203636969a33a806..01fad46d4a199df7164101d85b96b11644034452 100644 (file)
@@ -168,7 +168,7 @@ static ossl_inline int compute_growth(int target, int current)
         current = safe_muldiv_int(current, 8, 5, &err);
         if (err)
             return 0;
-        if (current > max_nodes)
+        if (current >= max_nodes)
             current = max_nodes;
     }
     return current;