File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,14 +24,14 @@ void encode(ByteList src) throws IOException {
2424 int pos = 0 ;
2525
2626 ByteBuffer bb = ByteBuffer .wrap (ptrBytes , 0 , len );
27- while (pos + 8 <= len ) {
27+ while (ptr + pos + 8 <= len ) {
2828 long x = bb .getLong (ptr + pos );
2929 if (skipChunk (x )) {
3030 pos += 8 ;
3131 continue ;
3232 }
33- int chunkEnd = pos + 8 ;
34- while (pos < chunkEnd ) {
33+ int chunkEnd = ptr + pos + 8 ;
34+ while (ptr + pos < chunkEnd ) {
3535 int ch = Byte .toUnsignedInt (ptrBytes [ptr + pos ]);
3636 int ch_len = ESCAPE_TABLE [ch ];
3737 if (ch_len > 0 ) {
@@ -43,7 +43,7 @@ void encode(ByteList src) throws IOException {
4343 }
4444 }
4545
46- if (pos + 4 <= len ) {
46+ if (ptr + pos + 4 <= len ) {
4747 int x = bb .getInt (ptr + pos );
4848 if (skipChunk (x )) {
4949 pos += 4 ;
You can’t perform that action at this time.
0 commit comments