com.eruces.teagent.WireLimits
The WireLimits class holds the bounded decoding policy for the native wire, shared by every decoder in this package.
TE81-32 step 8. This is the JAVA MIRROR of TricryptionSuite/include/eruces/wire_limits.h. The values are PROPAGATED from ADR-0084, not re-derived: every number below is the number the C++ header carries, and the derivation for each lives in that ADR and in that header. Changing one here without changing the other reintroduces exactly the drift these three files exist to prevent.
The consumers in this package are:
- TEAgentConnection.readBytes() – every variable-length field on the wire funnels through it, the peer of C++ CommConnection::operator>>.
- Matrix.MatrixMap.unmarshal() – the peer of C++ Matrix::unmarshal.
- FuncPackage.unmarshal() – the peer of C++ FuncPackage::unmarshal.
WHAT DOES NOT CARRY OVER, stated rather than silently omitted. The C++ header's per-field limit is justified partly as "refuse before any allocation". That property is NOT vacuous here: readBytes() allocated new byte[len] from the declared length BEFORE reading a single body byte, so a declared length of two billion was a two-billion-byte allocation request off a four-byte header. The guard is in the same position as the C++ one and for the same reason. What genuinely does not carry over is the C++ RAII/new[] bookkeeping (property 4 in CommConnection.cpp): the JVM releases the array on the throwing path without help, so there is nothing to mirror there.
© Pi Soft, 2018-2026 · Tricryption Engine 8.1