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

index out of range panic in parseMicEData #5

Open
cceremuga opened this issue Feb 21, 2021 · 1 comment
Open

index out of range panic in parseMicEData #5

cceremuga opened this issue Feb 21, 2021 · 1 comment

Comments

@cceremuga
Copy link

Here's the raw packet which triggered the panic:

VE2DJE-9>P_0_P?,VE2PCQ-3*,WIDE1*,KD2AYD-13*,KA2QYE-10*,WIDE2*:'{g+l >/Richard EN ROUTE

and here's a partial stacktrace

panic: runtime error: index out of range [0] with length 0

goroutine 19 [running]:
github.com/pd0mz/go-aprs.(*Packet).parseMicEData(0xc00008dc90, 0x19, 0xc00005e9
cf)
        /home/craig/go/pkg/mod/github.com/pd0mz/[email protected]
4d6aa54791a/packet.go:303 +0x7d6
github.com/pd0mz/go-aprs.(*Packet).parse(0xc00008dc90, 0x2d, 0xc000068e70)
        /home/craig/go/pkg/mod/github.com/pd0mz/[email protected]
4d6aa54791a/packet.go:266 +0x145
github.com/pd0mz/go-aprs.ParsePacket(0xc00005e9c6, 0x57, 0x0, 0x0, 0x0, 0x0, 0x
0, 0x0, 0x0, 0x0, ...)
        /home/craig/go/pkg/mod/github.com/pd0mz/[email protected]
4d6aa54791a/packet.go:172 +0x385
@cceremuga
Copy link
Author

Submitted a PR to resolve edge case in malformed packet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant