Closed
Description
Gist here. A solution to this would be to set len = index
before iterating. Obviously this would cause leaks but we're already leaking data.
(Sorry for the very verbose explanation in the linked gist but I wanted to link it as part of an article whose audience might not immediately understand the problem).