Closed pradt2 closed 1 year ago
Can you add a test that demonstrates the problem?
@staktrace Done. If you paste the added test in the current master, you'll see that it panics.
Sorry, I should have been more clear - do you have a real world example that this fails on? Like a .class
file that the JVM considers valid, rather than just constructing an invalid constant pool in code.
Dude wtf... Just look at your code, if the last attribute is a UTF8 string it will clearly fail.
Or, you know, maybe take 1 min to try your code on a HelloWorld example before releasing it to the public (remove .txt from filename first)...
v0.6.1
because I take pride in my work and this was a stupid mistake, not because of anything you've said or done so far.
Hi,
It is currently possible (and it fact, it has happened to me on a few occasions) that the ConstantPoolIter panicks with an out-of-range read.
This PR fixes it.