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

Some ICMP packets cause ArgumentException in listen mode #127

Closed
steom opened this issue May 23, 2023 · 3 comments
Closed

Some ICMP packets cause ArgumentException in listen mode #127

steom opened this issue May 23, 2023 · 3 comments
Labels

Comments

@steom
Copy link

steom commented May 23, 2023

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()

@Killeroo
Copy link
Owner

Thanks for reporting 👍

@Killeroo Killeroo added the Bug label Jun 27, 2023
@Killeroo Killeroo changed the title crash Some ICMP packets cause ArgumentException in listen mode Jun 27, 2023
@Killeroo Killeroo moved this to Todo in PowerPing v1.4.0 May 27, 2024
Killeroo added a commit that referenced this issue Jun 2, 2024
@Killeroo
Copy link
Owner

Killeroo commented Jun 5, 2024

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

@steom
Copy link
Author

steom commented Jun 6, 2024

speculative fix works. version 1.3.5 don't crash.

@github-project-automation github-project-automation bot moved this from Todo to Done in PowerPing v1.4.0 Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants