ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache.c in libmongocrypt-helper-1.11.0.0.1001 vs ext/libmongocrypt/libmongocrypt/src/mongocrypt-cache.c in libmongocrypt-helper-1.12.0.0.1001

- old
+ new

@@ -26,10 +26,10 @@ BSON_ASSERT_PARAM(pair); current = bson_get_monotonic_time() / 1000; BSON_ASSERT(current >= INT64_MIN + pair->last_updated); BSON_ASSERT(cache->expiration <= INT64_MAX); - return (current - pair->last_updated) > (int64_t)cache->expiration; + return cache->expiration > 0 && (current - pair->last_updated) > (int64_t)cache->expiration; } /* Return the pair after the one being destroyed. */ static _mongocrypt_cache_pair_t * _destroy_pair(_mongocrypt_cache_t *cache, _mongocrypt_cache_pair_t *prev, _mongocrypt_cache_pair_t *pair) {