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

bug: panic on discovery of 32bit UUIDs #4

Open
gkuchta opened this issue Mar 9, 2021 · 0 comments
Open

bug: panic on discovery of 32bit UUIDs #4

gkuchta opened this issue Mar 9, 2021 · 0 comments

Comments

@gkuchta
Copy link

gkuchta commented Mar 9, 2021

Hello!

Thanks for the great library!

While 32bit UUIDs aren't super common, they are out there; as-is, cbgo will panic if one's discovered https://github.com/JuulLabs-OSS/cbgo/blob/master/core.go#L104, so simply being in an environment where a 32bit UUID device is powered on will break anything using this library.

I've proposed a patch #3 to address this; it simply "upscales" a 32bit UUID to a 128bit UUID by appending the 128bit base UUID. It's tested locally and working; in fact, I'm using it to connect to a device broadcasting a 32bit UUID.

I wasn't sure how you might want this structured, so I figured I'd keep it dumb simple.

Cheers,

Garrett

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