You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Thomas Bachmann (Jira)" <ji...@apache.org> on 2021/09/15 14:15:00 UTC
[jira] [Created] (KAFKA-13304) Implicit cast of source type long to
narrower destination type int in
org.apache.kafka.common.network.MultiSend.java
Thomas Bachmann created KAFKA-13304:
---------------------------------------
Summary: Implicit cast of source type long to narrower destination type int in org.apache.kafka.common.network.MultiSend.java
Key: KAFKA-13304
URL: https://issues.apache.org/jira/browse/KAFKA-13304
Project: Kafka
Issue Type: Bug
Components: network
Affects Versions: 2.8.0
Reporter: Thomas Bachmann
During a security review of Kafka I came across this bug [https://lgtm.com/projects/g/apache/kafka/rev/78ba492e3e70fd9db61bc82469371d04a8d6b762/files/clients/src/main/java/org/apache/kafka/common/network/MultiSend.java?sort=name&dir=ASC&mode=heatmap#x9c1b5901406741c6:1]
{code:java}
@Override74 public long writeTo(GatheringByteChannel channel) throws IOException {75 if (completed())76 throw new KafkaException("This operation cannot be completed on a complete request.");7778 int totalWrittenPerCall = 0;79 boolean sendComplete = false;80 do {81 long written = current.writeTo(channel);82 totalWritten += written;83 totalWrittenPerCall += written;
{code}
"Implicit cast of source type long to narrower destination type int."
--
This message was sent by Atlassian Jira
(v8.3.4#803005)