Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
The BinaryDecoder.ReadString() method on NetStandard2.1+ produces a stack overflow exception if there is invalid input caused by this code:
int length = ReadInt(); Span<byte> buffer = length <= StackallocThreshold ? stackalloc byte[length] : (bufferArray = ArrayPool<byte>.Shared.Rent(length)).AsSpan(0, length);
This code fails if ReadInt() returns a negative value.
Attachments
Issue Links
- relates to
-
AVRO-3226 OutOfMemoryException on invalid input for BinaryDecoder.ReadString on NetStandard 2.1+
- Resolved
- links to