Changeset ab4a8ef1 for router


Ignore:
Timestamp:
Jul 6, 2018 5:13:48 PM (2 years ago)
Author:
zab2 <zab2@…>
Branches:
master
Children:
1c28495
Parents:
998931f
Message:

reinstate capacity check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/transport/ntcp/EventPumper.java

    r998931f rab4a8ef1  
    472472     */
    473473    public static void releaseBuf(ByteBuffer buf) {
     474        // double check
     475        if (buf.capacity() < BUF_SIZE) {
     476            I2PAppContext.getGlobalContext().logManager().getLog(EventPumper.class).error("Bad size " + buf.capacity(), new Exception());
     477            return;
     478        }
    474479        buf.clear();
    475480        _bufferCache.release(buf);
Note: See TracChangeset for help on using the changeset viewer.