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

stunlib_DecodeMessage with NULL stream can crash #1

Open
clux opened this issue Jun 24, 2015 · 0 comments
Open

stunlib_DecodeMessage with NULL stream can crash #1

clux opened this issue Jun 24, 2015 · 0 comments

Comments

@clux
Copy link
Contributor

clux commented Jun 24, 2015

This line will cause a crash when using stunlib with a NULL stream argument. i.e. stunlib_DecodeMessage(buff, bufLen, &msg, NULL, NULL). Pretty much everywhere in stunlib_DecodeMessage is guarding on stream != NULL) before calling printError, but in the case of an invalid crc, it does not.

I would suggest moving the NULL guard into printError to be less error prone and fix this use case.

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