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](
3941
3941
val maxCharBufSize = config.maxCharBufSize
3942
3942
if (charBufLen == maxCharBufSize) tooLongStringError()
3943
3943
charBufLen = (- 1 >>> Integer .numberOfLeadingZeros(charBufLen | required)) + 1
3944
- if (charBufLen > maxCharBufSize || charBufLen < 0 ) charBufLen = maxCharBufSize
3944
+ if (Integer .compareUnsigned( charBufLen, maxCharBufSize) > 0 ) charBufLen = maxCharBufSize
3945
3945
charBuf = java.util.Arrays .copyOf(charBuf, charBufLen)
3946
3946
charBufLen
3947
3947
}
@@ -4045,7 +4045,7 @@ final class JsonReader private[jsoniter_scala](
4045
4045
val maxBufSize = config.maxBufSize
4046
4046
if (bufLen == maxBufSize) tooLongInputError()
4047
4047
bufLen <<= 1
4048
- if (bufLen > maxBufSize || bufLen < 0 ) bufLen = maxBufSize
4048
+ if (Integer .compareUnsigned( bufLen, maxBufSize) > 0 ) bufLen = maxBufSize
4049
4049
buf = java.util.Arrays .copyOf(buf, bufLen)
4050
4050
}
4051
4051
Original file line number Diff line number Diff line change @@ -4414,7 +4414,7 @@ final class JsonReader private[jsoniter_scala](
4414
4414
val maxCharBufSize = config.maxCharBufSize
4415
4415
if (charBufLen == maxCharBufSize) tooLongStringError()
4416
4416
charBufLen = (- 1 >>> Integer .numberOfLeadingZeros(charBufLen | required)) + 1
4417
- if (charBufLen > maxCharBufSize || charBufLen < 0 ) charBufLen = maxCharBufSize
4417
+ if (Integer .compareUnsigned( charBufLen, maxCharBufSize) > 0 ) charBufLen = maxCharBufSize
4418
4418
charBuf = java.util.Arrays .copyOf(charBuf, charBufLen)
4419
4419
charBufLen
4420
4420
}
@@ -4518,7 +4518,7 @@ final class JsonReader private[jsoniter_scala](
4518
4518
val maxBufSize = config.maxBufSize
4519
4519
if (bufLen == maxBufSize) tooLongInputError()
4520
4520
bufLen <<= 1
4521
- if (bufLen > maxBufSize || bufLen < 0 ) bufLen = maxBufSize
4521
+ if (Integer .compareUnsigned( bufLen, maxBufSize) > 0 ) bufLen = maxBufSize
4522
4522
buf = java.util.Arrays .copyOf(buf, bufLen)
4523
4523
}
4524
4524
Original file line number Diff line number Diff line change @@ -4410,7 +4410,7 @@ final class JsonReader private[jsoniter_scala](
4410
4410
val maxCharBufSize = config.maxCharBufSize
4411
4411
if (charBufLen == maxCharBufSize) tooLongStringError()
4412
4412
charBufLen = (- 1 >>> Integer .numberOfLeadingZeros(charBufLen | required)) + 1
4413
- if (charBufLen > maxCharBufSize || charBufLen < 0 ) charBufLen = maxCharBufSize
4413
+ if (Integer .compareUnsigned( charBufLen, maxCharBufSize) > 0 ) charBufLen = maxCharBufSize
4414
4414
charBuf = java.util.Arrays .copyOf(charBuf, charBufLen)
4415
4415
charBufLen
4416
4416
}
@@ -4514,7 +4514,7 @@ final class JsonReader private[jsoniter_scala](
4514
4514
val maxBufSize = config.maxBufSize
4515
4515
if (bufLen == maxBufSize) tooLongInputError()
4516
4516
bufLen <<= 1
4517
- if (bufLen > maxBufSize || bufLen < 0 ) bufLen = maxBufSize
4517
+ if (Integer .compareUnsigned( bufLen, maxBufSize) > 0 ) bufLen = maxBufSize
4518
4518
buf = java.util.Arrays .copyOf(buf, bufLen)
4519
4519
}
4520
4520
You can’t perform that action at this time.
0 commit comments