Skip to content

Commit 819d6c6

Browse files
committed
Add release notes
1 parent def2272 commit 819d6c6

4 files changed

Lines changed: 17 additions & 5 deletions

File tree

cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2620,7 +2620,8 @@ private final String _finishLongText(int len) throws IOException
26202620
}
26212621

26222622
/**
2623-
* Consumes as many ascii chars as possible in a tight loop. Returns the amount of bytes remaining.
2623+
* Consumes as many ascii chars as possible in a tight loop.
2624+
* Returns the amount of bytes remaining.
26242625
*/
26252626
private final int _finishLongTextAscii(int len) throws IOException
26262627
{
@@ -2647,8 +2648,8 @@ private final int _finishLongTextAscii(int len) throws IOException
26472648
_inputPtr = inPtr - 1;
26482649
_textBuffer.setCurrentLength(outPtr);
26492650
// `len` was already decremented for all previous iterations; subtract only
2650-
// the bytes consumed in THIS iteration (= _inputPtr, since _tryToLoadToHaveAtLeast
2651-
// always resets _inputPtr to 0 before the inner loop).
2651+
// the bytes consumed in THIS iteration (= _inputPtr), since
2652+
// _tryToLoadToHaveAtLeast always resets _inputPtr to 0 before the inner loop.
26522653
return len - _inputPtr;
26532654
}
26542655
_inputPtr = inPtr;

cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/parse/CBORFinishLongTextAsciiBugTest.java renamed to cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/parse/CBORLongAsciiRead686Test.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
1414

1515
// For [dataformats-binary#686]
16-
public class CBORFinishLongTextAsciiBugTest
16+
public class CBORLongAsciiRead686Test
1717
{
1818
// TextBuffer segment sizes grow 1.5× per flip, starting at 200 chars (MIN=500):
1919
// S0=200, S1=500, S2=750, S3=1125, S4=1687, S5=2530, S6=3795, S7=5692, S8=8538

release-notes/CREDITS-2.x

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,5 +429,10 @@ Vincent Eigenberger (@beseder1)
429429
(2.20.1)
430430

431431
Yohei Kishimoto (@morokosi)
432-
* Reported #599: (cbor) Unable to deserialize stringref-enabled CBOR with ignored properties
432+
* Reported #599: (cbor) Unable to deserialize stringref-enabled CBOR with ignored propertie
433433
(2.21.0)
434+
435+
Halil İbrahim Şener (@hisener)
436+
* Fixed #686: `CBORParser._finishLongTextAscii` returns negative length when `TextBuffer`
437+
segment > I/O buffer, leaving non-ASCII byte unconsumed
438+
(2.21.3)

release-notes/VERSION-2.x

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Active maintainers:
1414
=== Releases ===
1515
------------------------------------------------------------------------
1616

17+
2.21.3 (not yet released)
18+
19+
#686: `CBORParser._finishLongTextAscii` returns negative length when `TextBuffer`
20+
segment > I/O buffer, leaving non-ASCII byte unconsumed
21+
(fixed by Halil İbrahim Ş)
22+
1723
2.21.2 (20-Mar-2026)
1824

1925
No changes since 2.21.1.

0 commit comments

Comments
 (0)