Commit 0592e71 authored and committed Apr 19, 2022
1 parent c4cf4df commit 0592e71 Copy full SHA for 0592e71
File tree 1 file changed +8
-9
lines changed
src/java.base/share/classes/sun/security/util
1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -144,15 +144,14 @@ private void parseTag() throws IOException {
144
144
* then skip the tag and its 1 byte length of zero.
145
145
*/
146
146
private void writeTag () {
147
- if (dataPos == dataSize ) {
148
- return ;
149
- }
150
- assert dataPos + 1 < dataSize ;
151
- if (isEOC (data , dataPos )) {
152
- dataPos += 2 ; // skip tag and length
153
- writeTag ();
154
- } else {
155
- newData [newDataPos ++] = data [dataPos ++];
147
+ while (dataPos < dataSize ) {
148
+ assert dataPos + 1 < dataSize ;
149
+ if (isEOC (data , dataPos )) {
150
+ dataPos += 2 ; // skip tag and length
151
+ } else {
152
+ newData [newDataPos ++] = data [dataPos ++];
153
+ break ;
154
+ }
156
155
}
157
156
}
158
157
You can’t perform that action at this time.
0 commit comments