diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Datagram.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Datagram.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Datagram.cpp 2026-08-20 01:33:57.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Datagram.cpp 2026-08-20 01:03:37.000000000 +0000 @@ -655,5 +655,4 @@ } - if (!m_RoutingSession) return nullptr; auto path = m_RoutingSession->GetSharedRoutingPath(); if (path && m_RoutingSession->IsRatchets () && m_RoutingSession->CleanupUnconfirmedTags ()) diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Destination.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Destination.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Destination.cpp 2026-08-20 01:33:57.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Destination.cpp 2026-08-20 01:03:37.000000000 +0000 @@ -558,17 +558,6 @@ void LeaseSetDestination::HandleDatabaseSearchReplyMessage (const uint8_t * buf, size_t len) { - if (len < 33) - { - LogPrint (eLogWarning, "Destination: Database search reply is too short, ", len); - return; - } i2p::data::IdentHash key (buf); int num = buf[32]; // num - size_t maxNum = (len - 33)/32; - if ((size_t)num > maxNum) - { - LogPrint (eLogWarning, "Destination: Declared number of peer hashes ", num, " exceeds message size, reduced to ", maxNum); - num = maxNum; - } LogPrint (eLogDebug, "Destination: DatabaseSearchReply for ", key.ToBase64 (), " num=", num); auto it = m_LeaseSetRequests.find (key); diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/NTCP2.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/NTCP2.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/NTCP2.cpp 2026-08-20 01:33:57.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/NTCP2.cpp 2026-08-20 01:03:37.000000000 +0000 @@ -993,5 +993,5 @@ } auto size = bufbe16toh (buf->data () + 1); - if (size < 1 || size + 3 > (int)buf->size () || size > i2p::data::MAX_RI_BUFFER_SIZE + 1) + if (size + 3 > (int)buf->size () || size > i2p::data::MAX_RI_BUFFER_SIZE + 1) { LogPrint (eLogError, "NTCP2: Unexpected RouterInfo size ", size, " in SessionConfirmed"); diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/NetDbRequests.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/NetDbRequests.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/NetDbRequests.cpp 2026-08-20 01:33:57.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/NetDbRequests.cpp 2026-08-20 01:03:37.000000000 +0000 @@ -361,10 +361,4 @@ { const uint8_t * buf = msg->GetPayload (); - size_t payloadLen = msg->GetPayloadLength (); - if (payloadLen < 33) - { - LogPrint (eLogWarning, "NetDbReq: Database search reply is too short, ", payloadLen); - return; - } std::string key; size_t num = buf[32]; // num @@ -400,11 +394,5 @@ LogPrint (eLogWarning, "NetDbReq: Too many peer hashes ", num, " in database search reply, Reduced to ", NETDB_MAX_NUM_SEARCH_REPLY_PEER_HASHES); num = NETDB_MAX_NUM_SEARCH_REPLY_PEER_HASHES; - } - size_t maxNum = (payloadLen - 33)/32; - if (num > maxNum) - { - LogPrint (eLogWarning, "NetDbReq: Declared number of peer hashes ", num, " exceeds message size, reduced to ", maxNum); - num = maxNum; - } + } if (isExploratory && !m_DiscoveredRouterHashes.empty ()) { diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Reseed.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Reseed.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Reseed.cpp 2026-08-20 01:33:57.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Reseed.cpp 2026-08-20 01:03:37.000000000 +0000 @@ -37,6 +37,4 @@ namespace data { - const uint64_t MAX_RESEED_CONTENT_LENGTH = 128*1024*1024; // 128 MB, sanity cap for SU3 content length - const uint32_t MAX_RESEED_FILE_SIZE = 64*1024*1024; // 64 MB, sanity cap for a single file inside the SU3 zip Reseeder::Reseeder() @@ -234,9 +232,4 @@ s.read ((char *)&contentLength, 8); // content length contentLength = be64toh (contentLength); - if (contentLength > MAX_RESEED_CONTENT_LENGTH) - { - LogPrint (eLogError, "Reseed: SU3 content length too large: ", contentLength); - return 0; - } s.seekg (1, std::ios::cur); // unused uint8_t fileType; @@ -395,9 +388,4 @@ continue; } - if (compressedSize > MAX_RESEED_FILE_SIZE || uncompressedSize > MAX_RESEED_FILE_SIZE) - { - LogPrint (eLogError, "Reseed: SU3 file size too large, compressed=", compressedSize, " uncompressed=", uncompressedSize); - return numFiles; - } uint8_t * compressed = new uint8_t[compressedSize]; diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Streaming.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Streaming.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd/Streaming.cpp 2026-08-20 01:33:57.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd/Streaming.cpp 2026-08-20 01:03:37.000000000 +0000 @@ -451,7 +451,6 @@ { const uint8_t * optionData = packet->GetOptionData (); - size_t optionOffset = optionData - packet->buf; size_t optionSize = packet->GetOptionSize (); - if (optionOffset > packet->len || optionSize > packet->len - optionOffset) + if (optionSize > packet->len) { LogPrint (eLogInfo, "Streaming: Invalid option size ", optionSize, " Discarded"); @@ -628,12 +627,6 @@ if (flags & PACKET_FLAG_SIGNATURE_INCLUDED) { - if (!m_TransientVerifier && !m_RemoteIdentity) - { - LogPrint (eLogError, "Streaming: Signature included without remote identity"); - return false; - } auto signatureLen = m_TransientVerifier ? m_TransientVerifier->GetSignatureLen () : m_RemoteIdentity->GetSignatureLen (); - size_t optionOffset2 = optionData - packet->buf; - if (optionOffset2 > packet->len || signatureLen > packet->len - optionOffset2) + if (signatureLen > packet->GetLength ()) { LogPrint (eLogError, "Streaming: Signature too big, ", signatureLen, " bytes"); diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/I2PTunnel.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/I2PTunnel.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/I2PTunnel.cpp 2026-08-20 01:33:57.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/I2PTunnel.cpp 2026-08-20 01:03:37.000000000 +0000 @@ -629,14 +629,11 @@ { pos = line.find (" "); - if (pos != std::string::npos) pos = line.find (" ", pos + 1); - auto nextpos = (pos != std::string::npos) ? line.find (" ", pos + 1) : std::string::npos; - if (pos == std::string::npos || nextpos == std::string::npos) - m_OutPacket << line << '\n'; // malformed USER line, pass through unmodified - else - { - m_OutPacket << line.substr (0, pos + 1); - m_OutPacket << context.GetAddressBook ().ToAddress (m_From->GetIdentHash ()); - m_OutPacket << line.substr (nextpos) << '\n'; - } + pos++; + pos = line.find (" ", pos); + pos++; + auto nextpos = line.find (" ", pos); + m_OutPacket << line.substr (0, pos); + m_OutPacket << context.GetAddressBook ().ToAddress (m_From->GetIdentHash ()); + m_OutPacket << line.substr (nextpos) << '\n'; } else diff -U2 -r /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/SAM.cpp /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/SAM.cpp --- /var/lib/copr-rpmbuild/results/i2pd-git/upstream-unpacked/Source0/i2pd-openssl/libi2pd_client/SAM.cpp 2026-08-20 01:33:57.000000000 +0000 +++ /var/lib/copr-rpmbuild/results/i2pd-git/srpm-unpacked/i2pd-openssl.tar.gz-extract/i2pd-openssl/libi2pd_client/SAM.cpp 2026-08-20 01:03:37.000000000 +0000 @@ -1311,15 +1311,7 @@ // get remote peer address auto dest = stream->GetRemoteIdentity()->ToBase64 (); - if (dest.length () + 1 > SAM_STREAM_BUFFER_SIZE) - { - LogPrint (eLogError, "SAM: Remote identity is too long ", dest.length ()); - newSocket->TerminateClose (); - } - else - { - memcpy (newSocket->m_StreamBuffer, dest.c_str (), dest.length ()); - newSocket->m_StreamBuffer[dest.length ()] = '\n'; - newSocket->HandleI2PReceive (boost::system::error_code (),dest.length () + 1); // we send identity like it has been received from stream - } + memcpy (newSocket->m_StreamBuffer, dest.c_str (), dest.length ()); + newSocket->m_StreamBuffer[dest.length ()] = '\n'; + newSocket->HandleI2PReceive (boost::system::error_code (),dest.length () + 1); // we send identity like it has been received from stream } else