github-advanced-security[bot] commented on code in PR #3928:
URL: https://github.com/apache/avro/pull/3928#discussion_r3737605718
##########
lang/java/avro/src/main/java/org/apache/avro/io/FastReaderBuilder.java:
##########
@@ -657,19 +678,24 @@
@Override
public Object read(Object reuse, Decoder decoder) throws IOException {
- long l = decoder.readMapStart();
- Map<Object, Object> targetMap = new HashMap<>();
-
- while (l > 0) {
- for (int i = 0; i < l; i++) {
- Object key = keyReader.read(null, decoder);
- Object value = valueReader.read(null, decoder);
- targetMap.put(key, value);
+ SystemLimitException.incrementDecodeDepth();
+ try {
+ long l = decoder.readMapStart();
+ Map<Object, Object> targetMap = new HashMap<>();
+
+ while (l > 0) {
+ for (int i = 0; i < l; i++) {
Review Comment:
## CodeQL / Comparison of narrow type with wide type in loop condition
Comparison between [expression](1) of type int and [expression](2) of wider
type long.
[Show more
details](https://github.com/apache/avro/security/code-scanning/3374)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]