PowerPing icon indicating copy to clipboard operation
PowerPing copied to clipboard

Some ICMP packets cause ArgumentException in listen mode

Open steom opened this issue 2 years ago • 1 comments

some icmp pattern cause crash.. fyi

Unhandled Exception: System.ArgumentException: Offset and length exceed the bounds of the array, or the count is greater than the number of elements from the index to the end of the source collection. in System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count) in PowerPing.ICMP..ctor(Byte[] data, Int32 size) in PowerPing.Listen.ListenForICMPOnAddress(IPAddress address) in System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) in System.Threading.ThreadHelper.ThreadStart()

steom avatar May 23 '23 07:05 steom

Thanks for reporting 👍

Killeroo avatar May 26 '23 17:05 Killeroo

I've added a speculative fix that should stop this from happening in the latest release. Please let me know if it keeps occuring.

Killeroo avatar Jun 05 '24 21:06 Killeroo

speculative fix works. version 1.3.5 don't crash.

steom avatar Jun 06 '24 07:06 steom