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

Fixed panic if h.MessageSize < hdrlen bytes. #692

Merged
merged 1 commit into from Oct 17, 2023

Conversation

SailorStu
Copy link
Contributor

This fix resolves a Panic seen in Receive() where if a MessageSize in Packet was less than expected 8 bytes, then a panic would result from an out of bounds slice. Fix is to check MessageSize against hdrlen(8) bytes and if smaller, return in error. https://github.com/SailorStu/Pcaps/blob/main/gopcua/opcua-crash.pcap

uacp/conn.go Outdated Show resolved Hide resolved
@kung-foo kung-foo added the bug Something isn't working label Oct 17, 2023
@kung-foo kung-foo merged commit 41e54cf into gopcua:main Oct 17, 2023
5 checks passed
@kung-foo kung-foo changed the title Fixed Receive Panic if h.MessageSize < hdrlen bytes. Fixed panic if h.MessageSize < hdrlen bytes. Oct 17, 2023
@SailorStu SailorStu deleted the fix-Receive-panic branch October 17, 2023 21:56
@magiconair magiconair modified the milestones: v0.5.3, v0.5.2 Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants