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

Inconsistend decode data can cause panic. #23

Closed
rokath opened this issue Feb 22, 2023 · 1 comment
Closed

Inconsistend decode data can cause panic. #23

rokath opened this issue Feb 22, 2023 · 1 comment
Assignees
Labels
quality secure correctness

Comments

@rokath
Copy link
Owner

rokath commented Feb 22, 2023

inconsistent TCOBSv1 buffer: [20 202 5 22 68 213 33 64 158 0]
inconsistent TCOBSv1 buffer: [32 209 0]
inconsistent TCOBSv1 buffer: [8 161 133 0]
inconsistent TCOBSv1 buffer: [8 249 89 0]
panic: runtime error: index out of range [-2]

goroutine 1 [running]:
github.com/rokath/tcobs/v1.repeatByte(...)
        C:/Users/ms/go/pkg/mod/github.com/rokath/tcobs@v0.0.0-20230205132339-8d91e904310e/v1/tcobsDecode.go:127
github.com/rokath/tcobs/v1.Decode({0xc00037a000, 0x10000, 0x10000}, {0xc00031af68, 0x1?, 0xf098})
        C:/Users/ms/go/pkg/mod/github.com/rokath/tcobs@v0.0.0-20230205132339-8d91e904310e/v1/tcobsDecode.go:95 +0x552
github.com/rokath/trice/internal/trexDecoder.(*trexDec).nextPackage(0xc0002fc000)
        C:/repos/trice/internal/trexDecoder/trexDecoder.go:148 +0x5d5
github.com/rokath/trice/internal/trexDecoder.(*trexDec).Read(0xc0002fc000, {0xc00034a000, 0x10000, 0x10000})
        C:/repos/trice/internal/trexDecoder/trexDecoder.go:205 +0x55
github.com/rokath/trice/internal/translator.decodeAndComposeLoop({0xc20420, 0xc000092a08}, 0xc00012dd50, {0xc20e18, 0xc0002fc000}, 0xc0000c7ce8?, 0x8add67?)
        C:/repos/trice/internal/translator/translator.go:143 +0x38c
github.com/rokath/trice/internal/translator.Translate({0xc20420?, 0xc000092a08}, 0xc20280?, 0xc000141830, 0xc0002785b8, 0xc000141980, {0x1f25271ee58?, 0xc0000da540})
        C:/repos/trice/internal/translator/translator.go:79 +0xaa7
github.com/rokath/trice/internal/args.logLoop({0xc20420?, 0xc000092a08}, 0xc000142600)
        C:/repos/trice/internal/args/handler.go:200 +0x730
github.com/rokath/trice/internal/args.Handler({0xc20580, 0xc0000ca008}, 0xc000142600, {0xc0000d4000, 0xc000142600?, 0x0?})
        C:/repos/trice/internal/args/handler.go:100 +0x305
main.doit({0xc20580, 0xc0000ca008}, 0xc00005c000?)
        C:/repos/trice/cmd/trice/main.go:44 +0x165
main.main()
        C:/repos/trice/cmd/trice/main.go:31 +0x50
@rokath rokath assigned rokath and unassigned rokath Apr 24, 2023
@rokath rokath added the quality secure correctness label Apr 24, 2023
@rokath rokath self-assigned this Sep 9, 2023
@rokath
Copy link
Owner Author

rokath commented Sep 9, 2023

Done in v0.9.0

@rokath rokath closed this as completed Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality secure correctness
Projects
None yet
Development

No branches or pull requests

1 participant