You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2022/10/04 12:26:03 UTC
[camel] 06/07: (chores) camel-jsonpath: apply required cast for intermediate variables
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 308d8f01e72c28c10727ba6781cf37a2a25505a3
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Tue Oct 4 11:52:17 2022 +0200
(chores) camel-jsonpath: apply required cast for intermediate variables
Among other things, it should prevent overflows
---
.../src/main/java/org/apache/camel/jsonpath/JsonStream.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonStream.java b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonStream.java
index 790b99b7fa3..803f793a18f 100644
--- a/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonStream.java
+++ b/components/camel-jsonpath/src/main/java/org/apache/camel/jsonpath/JsonStream.java
@@ -259,7 +259,7 @@ public class JsonStream extends FilterInputStream {
@Override
public long skip(long n) throws IOException {
if (inputIndex < inputEnd) {
- long minimum = Math.min(n, inputEnd - inputIndex);
+ long minimum = Math.min(n, (long) inputEnd - inputIndex);
for (int i = 0; i < minimum; i++) {
inputIndex++;
}