Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix hard fault when str is NULL #259

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

Merged
facchinm merged 1 commit into arduino-libraries:master from grobx:arduino/master
Aug 31, 2022
Merged

Fix hard fault when str is NULL #259

facchinm merged 1 commit into arduino-libraries:master from grobx:arduino/master
Aug 31, 2022

Conversation

Copy link

@grobx grobx commented Aug 30, 2022

BLEDevice::discoverService execute ATT.discoverAttributes(_addressType, _address, NULL) passing NULL as 3rd argument, that is eventually passed to BLEUuid constructor where it is used in strlen(str).

Since dereferencing null pointer is UB, we should avoid to call strlen(len).

Copy link

CLAassistant commented Aug 30, 2022
edited
Loading

CLA assistant check
All committers have signed the CLA.

@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Aug 30, 2022
Copy link
Contributor

LGTM! Thanks for the contribution, merging

fpistm and grobx reacted with thumbs up emoji

@facchinm facchinm merged commit 2a1cf72 into arduino-libraries:master Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /