aboutsip / pkts

Pure java based pcap library capable of reading and writing to/from pcaps.
Other
196 stars 91 forks source link

java.lang.NegativeArraySizeException #101

Open frojasg1 opened 5 years ago

frojasg1 commented 5 years ago

Hello, we are using your library to parse a pcap file (which is correctly read by wireshark ) and get packet information of it.

But, when reading the second packet, the header of that packet is not placed correctly in the bytes stream, and gives error:

java.lang.NegativeArraySizeException
    at io.pkts.buffer.BoundedInputStreamBuffer.readBytes(BoundedInputStreamBuffer.java:145)
    at io.pkts.framer.PcapFramer.frame(PcapFramer.java:66)
...

Can this be avoided in any way?

I attach the 3000 first bytes of the pcap, so that you can analize it http://www.frojasg1.com/small.pcap

I am new with your library, and I do not know if I am doing something badly.

I will be looking forward your answer.

kind regards, Fran.