From da5b063420b23c3bc50faf82a49a81b6ee3b3e30 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 28 Jul 2026 22:09:03 -0400 Subject: [PATCH] fixed possible overflow with negative value --- libi2pd/Streaming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index 5608e1fd..b50439bb 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -1173,7 +1173,7 @@ namespace stream if (m_LastACKSendTime) passedTime = (ts - m_LastACKSendTime)*1000; // in microseconds numPackets = (passedTime + m_PacketACKIntervalRem) / m_PacketACKInterval; - int64_t delta = numPackets * m_PacketACKInterval - passedTime; + int64_t delta = numPackets * (int64_t)m_PacketACKInterval - passedTime; if (delta < (int64_t)m_PacketACKIntervalRem) m_PacketACKIntervalRem -= delta; else