File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
js/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core
jvm/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core
native/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3941,7 +3941,7 @@ final class JsonReader private[jsoniter_scala](
39413941 val maxCharBufSize = config.maxCharBufSize
39423942 if (charBufLen == maxCharBufSize) tooLongStringError()
39433943 charBufLen = (- 1 >>> Integer .numberOfLeadingZeros(charBufLen | required)) + 1
3944- if (charBufLen > maxCharBufSize || charBufLen < 0 ) charBufLen = maxCharBufSize
3944+ if (Integer .compareUnsigned( charBufLen, maxCharBufSize) > 0 ) charBufLen = maxCharBufSize
39453945 charBuf = java.util.Arrays .copyOf(charBuf, charBufLen)
39463946 charBufLen
39473947 }
@@ -4045,7 +4045,7 @@ final class JsonReader private[jsoniter_scala](
40454045 val maxBufSize = config.maxBufSize
40464046 if (bufLen == maxBufSize) tooLongInputError()
40474047 bufLen <<= 1
4048- if (bufLen > maxBufSize || bufLen < 0 ) bufLen = maxBufSize
4048+ if (Integer .compareUnsigned( bufLen, maxBufSize) > 0 ) bufLen = maxBufSize
40494049 buf = java.util.Arrays .copyOf(buf, bufLen)
40504050 }
40514051
Original file line number Diff line number Diff line change @@ -4414,7 +4414,7 @@ final class JsonReader private[jsoniter_scala](
44144414 val maxCharBufSize = config.maxCharBufSize
44154415 if (charBufLen == maxCharBufSize) tooLongStringError()
44164416 charBufLen = (- 1 >>> Integer .numberOfLeadingZeros(charBufLen | required)) + 1
4417- if (charBufLen > maxCharBufSize || charBufLen < 0 ) charBufLen = maxCharBufSize
4417+ if (Integer .compareUnsigned( charBufLen, maxCharBufSize) > 0 ) charBufLen = maxCharBufSize
44184418 charBuf = java.util.Arrays .copyOf(charBuf, charBufLen)
44194419 charBufLen
44204420 }
@@ -4518,7 +4518,7 @@ final class JsonReader private[jsoniter_scala](
45184518 val maxBufSize = config.maxBufSize
45194519 if (bufLen == maxBufSize) tooLongInputError()
45204520 bufLen <<= 1
4521- if (bufLen > maxBufSize || bufLen < 0 ) bufLen = maxBufSize
4521+ if (Integer .compareUnsigned( bufLen, maxBufSize) > 0 ) bufLen = maxBufSize
45224522 buf = java.util.Arrays .copyOf(buf, bufLen)
45234523 }
45244524
Original file line number Diff line number Diff line change @@ -4410,7 +4410,7 @@ final class JsonReader private[jsoniter_scala](
44104410 val maxCharBufSize = config.maxCharBufSize
44114411 if (charBufLen == maxCharBufSize) tooLongStringError()
44124412 charBufLen = (- 1 >>> Integer .numberOfLeadingZeros(charBufLen | required)) + 1
4413- if (charBufLen > maxCharBufSize || charBufLen < 0 ) charBufLen = maxCharBufSize
4413+ if (Integer .compareUnsigned( charBufLen, maxCharBufSize) > 0 ) charBufLen = maxCharBufSize
44144414 charBuf = java.util.Arrays .copyOf(charBuf, charBufLen)
44154415 charBufLen
44164416 }
@@ -4514,7 +4514,7 @@ final class JsonReader private[jsoniter_scala](
45144514 val maxBufSize = config.maxBufSize
45154515 if (bufLen == maxBufSize) tooLongInputError()
45164516 bufLen <<= 1
4517- if (bufLen > maxBufSize || bufLen < 0 ) bufLen = maxBufSize
4517+ if (Integer .compareUnsigned( bufLen, maxBufSize) > 0 ) bufLen = maxBufSize
45184518 buf = java.util.Arrays .copyOf(buf, bufLen)
45194519 }
45204520
You can’t perform that action at this time.
0 commit comments