AndrewJSchofield commented on code in PR #22514:
URL: https://github.com/apache/kafka/pull/22514#discussion_r3379422248
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/assignment/AssignmentInfo.java:
##########
@@ -486,7 +488,7 @@ private static Set<TopicPartition>
readTopicPartitions(final DataInputStream in,
final Map<Integer,
String> topicIndexDict,
final int length)
throws IOException {
final int numPartitions = in.readInt();
- if (numPartitions < 0 || numPartitions > length) {
+ if (numPartitions < 0 || numPartitions > length / (2 * Integer.BYTES))
{ // we read two INTEGERS per entry
Review Comment:
nit: In the other comment improvements in this file, you have said what the
values are. What are these mysterious integers? Something like "index key +
partition" I think.
--
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]