Fix _finishLongTextAscii returning negative remaining length#687
Fix _finishLongTextAscii returning negative remaining length#687cowtowncoder merged 3 commits intoFasterXML:2.21from
_finishLongTextAscii returning negative remaining length#687Conversation
|
Ok, I think fix needs to against branch |
|
Aside from re-creating PR against Once we have it, I can proceed with merging & CLA is good for all future contributions. Thank you again -- looking forward to merging the fix! |
`return len - outPtr` was wrong when `outPtr` accumulated across multiple outer-loop iterations: `len` had already been decremented for previous iterations, so subtracting the full `outPtr` produced a negative value, causing `_finishLongText` to skip decoding the non-ASCII byte. Fix: use `return len - _inputPtr`, which holds only the bytes consumed in the current iteration.
e020aa5 to
def2272
Compare
|
Addressed the comment and rebased onto 2.21. Also sent the CLA email. |
|
Thank you, @hisener ! Fix merged in, will be in 2.21.3 and 3.1.2. |
|
@cowtowncoder Is there a planned date for the 2.21.3 release? |
|
@hisener Depends on various things, including my availability (takes 2 hours of time to publish). Within next couple of weeks, maybe? |
|
@cowtowncoder sounds good; thanks! |
return len - outPtrwas wrong whenoutPtraccumulated across multiple outer-loop iterations:lenhad already been decremented for previous iterations, so subtracting the fulloutPtrproduced a negative value, causing_finishLongTextto skip decoding the non-ASCII byte.Fix: use
return len - _inputPtr, which holds only the bytes consumed in the current iteration.Fixes #686.