alexey-pelykh commented on PR #509:
URL:
https://github.com/apache/commons-collections/pull/509#issuecomment-2260619965
> And yes, there are probably more of these types of bugs lurking around, so
let's not add new ones ;-)
Absolutely not my intent! That said, I guess I'm too dumb to understand how
that bug may be exploited in this case.
- If a `CartesianProductIterator` is passed an infinite iterable, the result
is expectedly infinite - the same was as for loop over infinite iterable is
going to be infinite.
- If a `CartesianProductIterator` is passed an iterable that is modified
while iterating over the iterator, it may or may not yield into an infinite
iterator.
- If a `CartesianProductIterator` is passed a fake iterable that always
returns reference to the `CartesianProductIterator` it was passed to
("iterating over self") - it may be infinite.
However, the infinite loop won't happen in the`CartesianProductIterator`
itself, but the `hasNext()` will always be true - so iterating over such an
iterator will be infinite, alike iterating over a "random generator" iterator.
--
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]