netty5/buffer/src/main/java/io/netty/buffer
Norman Maurer 131be58f48
Correctly take length of ByteBufInputStream into account for readLine… (#9310)
* Correctly take length of ByteBufInputStream into account for readLine() / readByte()

Motivation:

ByteBufInputStream did not correctly take the length into account when validate bounds for readLine() / readByte() which could lead to read more then allowed.

Modifications:

- Correctly take length into account
- Add unit tests
- Fix existing unit test

Result:

Correctly take length of ByteBufInputStream into account.
Related to https://github.com/netty/netty/pull/9306.
2019-07-01 20:55:23 +02:00
..
AbstractByteBuf.java De-duplicate PooledByteBuf implementations (#9120) 2019-06-19 20:50:27 +02:00
AbstractByteBufAllocator.java Prefer direct io buffers if direct buffers pooled (#9167) 2019-05-22 07:32:41 +02:00
AbstractDerivedByteBuf.java Further reduce ensureAccessible() overhead (#8895) 2019-02-28 20:40:41 +01:00
AbstractPooledDerivedByteBuf.java Centralize internal reference counting logic (#8614) 2019-04-09 16:22:32 +02:00
AbstractReferenceCountedByteBuf.java Centralize internal reference counting logic (#8614) 2019-04-09 16:22:32 +02:00
AbstractUnpooledSlicedByteBuf.java Add tests to ensure an IllegalReferenceCountException is thrown if set/writeCharSequence is called on a released buffer 2017-07-21 07:39:32 +02:00
AbstractUnsafeSwappedByteBuf.java Don't check accessible in the #capacity method (#7830) 2018-04-03 21:35:02 +02:00
AdvancedLeakAwareByteBuf.java Motivation: Resource Leak Detector (RLD) tries to helpfully indicate where an object was last accessed and report the accesses in the case the object was not cleaned up. It handles lightly used objects well, but drops all but the last few accesses. 2017-10-19 12:21:21 -07:00
AdvancedLeakAwareCompositeByteBuf.java CompositeByteBuf optimizations and new addFlattenedComponents method (#8939) 2019-04-08 20:48:08 +02:00
ByteBuf.java Introduce ByteBuf.maxFastWritableBytes() method (#9086) 2019-05-22 20:11:24 +02:00
ByteBufAllocator.java MessageToByteEncoder always starts with ByteBuf that use initalCapacity == 0 2014-06-24 13:55:21 +09:00
ByteBufAllocatorMetric.java Expose ByteBufAllocator metric in a more general way 2017-03-08 20:07:58 +01:00
ByteBufAllocatorMetricProvider.java Expose ByteBufAllocator metric in a more general way 2017-03-08 20:07:58 +01:00
ByteBufHolder.java Make retained derived buffers recyclable 2016-05-17 11:16:13 +02:00
ByteBufInputStream.java Correctly take length of ByteBufInputStream into account for readLine… (#9310) 2019-07-01 20:55:23 +02:00
ByteBufOutputStream.java Minor improvements in ByteBufOutputStream 2017-10-21 14:44:13 +02:00
ByteBufProcessor.java Add @Deprecated when the javadoc says its deprecated 2016-05-01 20:30:13 +02:00
ByteBufUtil.java Fix the issue of incorrectly calculating the number of dump lines when using PrettyDump in ByteBufUtil (#9304) 2019-07-01 08:35:18 +02:00
CompositeByteBuf.java Fix redundant or missing checks and other inconsistencies in ByteBuf impls (#9119) 2019-05-27 15:32:08 +02:00
DefaultByteBufHolder.java fix the typos 2017-04-20 04:56:09 +02:00
DuplicatedByteBuf.java retainSlice() unwrap ByteBuf 2016-07-29 11:16:44 -07:00
EmptyByteBuf.java EmptyByteBuf.getCharSequence(0,...) must return empty String (#9272) 2019-06-24 21:09:19 +02:00
FixedCompositeByteBuf.java Replace toArray(new T[size]) with toArray(new T[0]) to eliminate zero-out and allow the VM to optimize. (#8075) 2018-06-29 07:56:04 +02:00
HeapByteBufUtil.java Add first-class Little Endian support to ByteBuf and descendants 2015-11-26 20:30:24 +01:00
package-info.java Synchronized between 4.1 and master 2014-04-25 00:38:02 +09:00
PoolArena.java Don't try to put back MemoryRegionCache.Entry objects into the Recycler when recycled because of a finalizer. (#8955) 2019-03-22 12:16:21 +01:00
PoolArenaMetric.java Allow to retrieve the number of active bytes per PoolArena. 2016-04-09 18:54:05 +02:00
PoolChunk.java Provide a way to cache the internal nioBuffer of the PooledByteBuffer… (#8603) 2018-12-04 15:26:05 +01:00
PoolChunkList.java Provide a way to cache the internal nioBuffer of the PooledByteBuffer… (#8603) 2018-12-04 15:26:05 +01:00
PoolChunkListMetric.java fix the typos 2017-04-20 04:56:09 +02:00
PoolChunkMetric.java Expose metrics for PooledByteBufAllocator 2015-05-20 21:06:17 +02:00
PooledByteBuf.java De-duplicate PooledByteBuf implementations (#9120) 2019-06-19 20:50:27 +02:00
PooledByteBufAllocator.java Don't try to put back MemoryRegionCache.Entry objects into the Recycler when recycled because of a finalizer. (#8955) 2019-03-22 12:16:21 +01:00
PooledByteBufAllocatorMetric.java Expose ByteBufAllocator metric in a more general way 2017-03-08 20:07:58 +01:00
PooledDirectByteBuf.java De-duplicate PooledByteBuf implementations (#9120) 2019-06-19 20:50:27 +02:00
PooledDuplicatedByteBuf.java Consistency between pooled/unpooled derived buffers 2016-11-21 11:38:10 -08:00
PooledHeapByteBuf.java De-duplicate PooledByteBuf implementations (#9120) 2019-06-19 20:50:27 +02:00
PooledSlicedByteBuf.java Consistency between pooled/unpooled derived buffers 2016-11-21 11:38:10 -08:00
PooledUnsafeDirectByteBuf.java De-duplicate PooledByteBuf implementations (#9120) 2019-06-19 20:50:27 +02:00
PooledUnsafeHeapByteBuf.java AbstractByteBuf.ensureWritable(...) should check if buffer was released 2017-07-19 07:34:08 +02:00
PoolSubpage.java Fix NPE that was encounter by debugger (will never happen in real code). (#8992) 2019-04-01 19:44:28 +02:00
PoolSubpageMetric.java Expose metrics for PooledByteBufAllocator 2015-05-20 21:06:17 +02:00
PoolThreadCache.java Don't try to put back MemoryRegionCache.Entry objects into the Recycler when recycled because of a finalizer. (#8955) 2019-03-22 12:16:21 +01:00
ReadOnlyByteBuf.java ByteBufs which are not resizable should not throw in ensureWritable(int,boolean) 2017-07-22 08:44:48 -07:00
ReadOnlyByteBufferBuf.java Fix redundant or missing checks and other inconsistencies in ByteBuf impls (#9119) 2019-05-27 15:32:08 +02:00
ReadOnlyUnsafeDirectByteBuf.java Fix incorrect behavior of ReadOnlyByteBufferBuf.getBytes(int,ByteBuffer) (#9125) 2019-05-13 07:00:06 +02:00
SimpleLeakAwareByteBuf.java Record release when enable detailed leak detection 2017-07-18 09:28:56 +02:00
SimpleLeakAwareCompositeByteBuf.java Record release when enable detailed leak detection 2017-07-18 09:28:56 +02:00
SlicedByteBuf.java retainSlice() unwrap ByteBuf 2016-07-29 11:16:44 -07:00
SwappedByteBuf.java Introduce ByteBuf.maxFastWritableBytes() method (#9086) 2019-05-22 20:11:24 +02:00
Unpooled.java Fix minor spelling issues in javadocs (#8701) 2019-01-14 07:24:34 +01:00
UnpooledByteBufAllocator.java Make UnpooledHeapByteBuf array methods protected (#8015) 2018-06-13 11:43:31 -07:00
UnpooledDirectByteBuf.java De-duplicate UnpooledDirectByteBuf/UnpooledUnsafeDirectByteBuf (#9085) 2019-06-03 13:04:10 +02:00
UnpooledDuplicatedByteBuf.java retained[Slice|Duplicate] buffer reference count bug 2016-11-17 09:35:39 -08:00
UnpooledHeapByteBuf.java Fix redundant or missing checks and other inconsistencies in ByteBuf impls (#9119) 2019-05-27 15:32:08 +02:00
UnpooledSlicedByteBuf.java retained[Slice|Duplicate] buffer reference count bug 2016-11-17 09:35:39 -08:00
UnpooledUnsafeDirectByteBuf.java All override methods must be added @override (#9285) 2019-06-27 13:51:26 +02:00
UnpooledUnsafeHeapByteBuf.java Make UnpooledUnsafeHeapByteBuf class public (#9184) 2019-05-31 07:04:03 +02:00
UnpooledUnsafeNoCleanerDirectByteBuf.java Also use realloc when shrink the buffer. 2017-07-06 20:03:15 +02:00
UnreleasableByteBuf.java Retained[Duplicate|Slice] operations should not increase the reference count for UnreleasableByteBuf 2017-03-31 17:45:29 -07:00
UnsafeByteBufUtil.java Fix incorrect sizing of temp byte arrays in (Unsafe)ByteBufUtil (#8484) 2018-11-09 18:24:38 +01:00
UnsafeDirectSwappedByteBuf.java Add *UnsafeHeapByteBuf for improve performance on systems with sun.misc.Unsafe 2015-10-21 09:04:13 +02:00
UnsafeHeapSwappedByteBuf.java Add *UnsafeHeapByteBuf for improve performance on systems with sun.misc.Unsafe 2015-10-21 09:04:13 +02:00
WrappedByteBuf.java Introduce ByteBuf.maxFastWritableBytes() method (#9086) 2019-05-22 20:11:24 +02:00
WrappedCompositeByteBuf.java Introduce ByteBuf.maxFastWritableBytes() method (#9086) 2019-05-22 20:11:24 +02:00
WrappedUnpooledUnsafeDirectByteBuf.java [#5645] Allow to create ByteBuf from existing memory address. 2016-08-16 14:16:15 +02:00