forked fromAsyncHttpClient/async-http-client
- Notifications
You must be signed in to change notification settings - Fork0
Commitc8783ff
committed
Reset Utf8ByteBufCharsetDecoder splitCharBuffer,closeAsyncHttpClient#1325
Motivation:Utf8ByteBufCharsetDecoder crashes with BufferOverflow when trying todecode a char whose byte length is larger than the one of the firstsplit char that was decoded.This happens because we only reset position while we should beresetting capacity too.Modifications:User ByteBuffer reset instead os `position(0)`.Result:No more BufferOverflow1 parent968358a commitc8783ff
File tree
2 files changed
+40
-20
lines changed- netty-utils/src
- main/java/org/asynchttpclient/netty/util
- test/java/org/asynchttpclient/netty/util
2 files changed
+40
-20
lines changedLines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
| |||
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 51 | + | |
| 52 | + | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
75 | 71 | | |
76 | 72 | | |
77 | 73 | | |
| 74 | + | |
78 | 75 | | |
79 | 76 | | |
80 | 77 | | |
| |||
119 | 116 | | |
120 | 117 | | |
121 | 118 | | |
122 | | - | |
123 | | - | |
124 | 119 | | |
125 | 120 | | |
126 | 121 | | |
| |||
135 | 130 | | |
136 | 131 | | |
137 | 132 | | |
138 | | - | |
139 | 133 | | |
140 | 134 | | |
141 | 135 | | |
| |||
Lines changed: 34 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
40 | 66 | | |
41 | 67 | | |
0 commit comments
Comments
(0)