[ 
https://issues.apache.org/jira/browse/AVRO-3225?focusedWorklogId=663154&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-663154
 ]

ASF GitHub Bot logged work on AVRO-3225:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 09/Oct/21 09:18
            Start Date: 09/Oct/21 09:18
    Worklog Time Spent: 10m 
      Work Description: iemejia commented on pull request #1357:
URL: https://github.com/apache/avro/pull/1357#issuecomment-939263393


   R: @blachniet mind to take a look please
   CC: @RyanSkraba this fix (when merged) should be cherry picked into 1.11.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 663154)
    Time Spent: 0.5h  (was: 20m)

> StackOverflowException on invalid input for BinaryDecoder.ReadString on 
> NetStandard 2.1+
> ----------------------------------------------------------------------------------------
>
>                 Key: AVRO-3225
>                 URL: https://issues.apache.org/jira/browse/AVRO-3225
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: csharp
>            Reporter: Philip Sanetra
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.11.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The BinaryDecoder.ReadString() method on NetStandard2.1+ produces a stack 
> overflow exception if there is invalid input caused by this code:
>  
> {code:java}
> int length = ReadInt();
> Span<byte> buffer = length <= StackallocThreshold ? stackalloc byte[length] : 
>                (bufferArray = ArrayPool<byte>.Shared.Rent(length)).AsSpan(0, 
> length);
> {code}
>  
> This code fails if ReadInt() returns a negative value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to