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

MicroBitBLEManager::restartInBLEMode() uses the wrong size for RebootModeValue #11

Open
martinwork opened this issue Jun 6, 2018 · 1 comment

Comments

@martinwork
Copy link

martinwork commented Jun 6, 2018

On branch "code-review"...

RebootMode is deleted when it is NULL. When it's non-NULL, RebootMode leaks, though this doesn't matter much as the next line is a reset.

sizeof(RebootMode) should be sizeof(RebootModeValue).

@martinwork martinwork changed the title MicroBitBLEManager::restartInBLEMode() MicroBitBLEManager::restartInBLEMode() could crash Jun 6, 2018
@martinwork
Copy link
Author

Just realised microbit_free checks for a NULL pointer, so in normal circumstances it won't crash, but deleting a NULL pointer still seems wrong!

And sizeof(RebootMode) should be sizeof(RebootModeValue).

@martinwork martinwork changed the title MicroBitBLEManager::restartInBLEMode() could crash MicroBitBLEManager::restartInBLEMode() uses the wrong size for RebootModeValue Jun 12, 2018
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