Skip to content

Commit b46492a

Browse files
committed
Merge branch '2.x' into 3.0
2 parents 4cd07d0 + a12c5a2 commit b46492a

File tree

7 files changed

+24
-7
lines changed

7 files changed

+24
-7
lines changed

cbor/src/main/java/tools/jackson/dataformat/cbor/CBORParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2592,7 +2592,7 @@ private final int _finishLongTextAscii(int len) throws JacksonException
25922592
int outPtr = 0;
25932593
while (len > 0) {
25942594
// load as much input as possible
2595-
int size = Math.min(len, Math.min(outBuf.length, input.length));
2595+
int size = Math.min(len, Math.min((outBuf.length - outPtr), input.length));
25962596
if (!_tryToLoadToHaveAtLeast(size)) {
25972597
return len;
25982598
}

cbor/src/test/resources/data/macbeth-snippet-chunked.cbor

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
y�---
1+
y�The Tragedy of Macbeth, often shortened to Macbeth, is a tragedy by William Shakespeare, estimated to have been first performed in 1606
2+
---
23
Act I, Scene
34

45
A desert place.
@@ -117,11 +118,11 @@ First Witch. Where hast thou been, sister?
117118
Second Witch. Killing swine.
118119
Third Witch. Sister, where thou?
119120
First Witch. A sailor's wife had chestnuts in her lap,
120-
And munch'd, and munch'd, and munch'd:-
121+
And munch'd, and munch'd, any�d munch'd:-
121122
'Give me,' quoth I:
122123
'Aroint thee, witch!' the rump-fed ronyon cries.
123124
Her husband's to Aleppo gone, master o' the Tiger:
124-
Buty� in a sieve I'll thither sail,
125+
But in a sieve I'll thither sail,
125126
And, like a rat without a tail,
126127
I'll do, I'll do, and I'll do.
127128
Second Witch. I'll give thee a wind.
@@ -223,12 +224,13 @@ Nothing afeard of what thyself didst make,
223224
Strange images of death. As thick as hail
224225
Came post with post; and every one did bear
225226
Thy praises in his kingdom's great defence,
226-
And pour'd them down before him.
227+
And pour'd them down before himy
228+
f.
227229
Angus. We are sent
228230
To give thee from our royal master thanks;
229231
Only to herald thee into his sight,
230232
Not pay thee.
231-
Ross. And, for an eary �nest of a greater honour,
233+
Ross. And, for an earnest of a greater honour,
232234
He bade me, from him, call thee thane of Cawdor:
233235
In which addition, hail, most worthy thane!
234236
For it is thine.

cbor/src/test/resources/data/macbeth-snippet-non-chunked.cbor

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
y)---
1+
y)�The Tragedy of Macbeth, often shortened to Macbeth, is a tragedy by William Shakespeare, estimated to have been first performed in 1606
2+
---
23
Act I, Scene
34

45
A desert place.

cbor/src/test/resources/data/macbeth-snippet.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
The Tragedy of Macbeth, often shortened to Macbeth, is a tragedy by William Shakespeare, estimated to have been first performed in 1606
12
---
23
Act I, Scene
34

release-notes/CREDITS-2.x

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,9 @@ Manuel Sugawara (@sugmanue)
386386
(2.19.0)
387387
* Contributed fix for #616: CBOR text gets truncated on decoding
388388
(2.19.3)
389+
* Conribued fix for #640: (cbor) CBOR throws ArrayIndexOutOfBoundsException
390+
with long ASCII text
391+
(2.20.2)
389392

390393
Josh Curry (@seadbrane)
391394
* Reported, contributed fix for #571: Unable to deserialize a pojo with IonStruct

release-notes/VERSION

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ implementations)
1414
=== Releases ===
1515
------------------------------------------------------------------------
1616

17+
3.0.4 (not yet released)
18+
19+
#640: (cbor) CBOR throws ArrayIndexOutOfBoundsException with long ASCII text
20+
(reported, fix contributed by Manuel S)
21+
1722
3.0.3 (28-Nov-2025)
1823

1924
- (avro) Upgrade `avro` lib dep to 1.11.5 (from 1.11.4)

release-notes/VERSION-2.x

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ Active maintainers:
2424
(reported by Josh C)
2525
- (avro) Upgrade `avro` lib dep to 1.11.5 (from 1.11.4)
2626

27+
2.20.2 (not yet released)
28+
29+
#640: (cbor) CBOR throws ArrayIndexOutOfBoundsException with long ASCII text
30+
(reported, fix contributed by Manuel S)
31+
2732
2.20.1 (30-Oct-2025)
2833

2934
#599: (cbor) Unable to deserialize stringref-enabled CBOR with ignored properties

0 commit comments

Comments
 (0)