Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Length is larger than buffer. Request=1226842144, capacity=262144 #124

Open
doctorbean opened this issue Jul 25, 2020 · 1 comment
Open

Comments

@doctorbean
Copy link

Exception in thread "main" java.lang.IllegalArgumentException: Length is larger than buffer. Request=1226842144, capacity=262144
at io.pkts.buffer.BoundedInputStreamBuffer.internalReadBytes(BoundedInputStreamBuffer.java:171)
at io.pkts.buffer.BoundedInputStreamBuffer.readBytes(BoundedInputStreamBuffer.java:131)
at io.pkts.framer.PcapFramer.frame(PcapFramer.java:66)
at io.pkts.Pcap.loop(Pcap.java:79)
at io.pkts.examples.streams.StreamsExample001.main(StreamsExample001.java:77)

what can I do ?

@jonbo372
Copy link
Collaborator

Hi,

Currently, the only thing you can do is either to change the capacity and rebuild the project. I've been meaning to change the way pcaps are read so that you can read an infinite size (in short, read one frame a time and then throw it away once processed and as such, do not allocate a massive buffer for the entire pcap). However, pretty sure I will not get to that anytime soon but pull requests are welcome! :-)

/Jonas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants