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