I am dealing with a hardware/RF bug that is probably exposing this, but I found a weakness in the handleL2CAP() function that will cause a runtime error. If the byte slice packet is less than 4 bytes, the cid synthesis will have a slice indexing error that will cause the entire program to crash.
this line
cid := uint16(a.b[2]) | (uint16(a.b[3]) << 8)
I am dealing with a hardware/RF bug that is probably exposing this, but I found a weakness in the handleL2CAP() function that will cause a runtime error. If the byte slice packet is less than 4 bytes, the cid synthesis will have a slice indexing error that will cause the entire program to crash. this line cid := uint16(a.b[2]) | (uint16(a.b[3]) << 8)
will blow up if size(a.b) < 4
I have a fix that I can do a pull request with.