From c63c5954ecd574035a603a7aa293b3e527e1e156 Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Wed, 27 Mar 2024 02:39:58 +0000 Subject: [PATCH] pink: Fix potential integer overflow --- crates/pink/chain-extension/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/pink/chain-extension/src/lib.rs b/crates/pink/chain-extension/src/lib.rs index 31a7cdd2f..fd6cbe2bc 100644 --- a/crates/pink/chain-extension/src/lib.rs +++ b/crates/pink/chain-extension/src/lib.rs @@ -63,7 +63,7 @@ pub fn batch_http_request(requests: Vec, timeout_ms: u64) -> ext::B .into_iter() .map(|request| async_http_request(request, timeout_ms)); tokio::time::timeout( - Duration::from_millis(timeout_ms + 200), + Duration::from_millis(timeout_ms.saturating_add(200)), futures::future::join_all(futs), ) .await