I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 91b3889c authored by zzz's avatar zzz
Browse files

catch a rare AIOOB

parent 33f4fac4
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,12 @@ public class FragmentHandler {
int padding = 0;
while (preprocessed[offset] != (byte)0x00) {
offset++; // skip the padding
// AIOOBE http://forum.i2p/viewtopic.php?t=3187
if (offset >= TrivialPreprocessor.PREPROCESSED_SIZE) {
_cache.release(new ByteArray(preprocessed));
_context.statManager().addRateData("tunnel.corruptMessage", 1, 1);
return;
}
padding++;
}
offset++; // skip the final 0x00, terminating the padding
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment