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

Fix fclose(NULL) in settings---files that might cause crashes #1345

Merged
merged 1 commit into from
May 25, 2022
Merged

Fix fclose(NULL) in settings---files that might cause crashes #1345

merged 1 commit into from
May 25, 2022

Conversation

nopid
Copy link
Contributor

@nopid nopid commented May 24, 2022

fclose(NULL) has undefined behavior and might in some case lead to segfault and crash.

This PR simply test before calling fclose inside the _exists code for files based settings.

Should fix microsoft/pxt-arcade#3812 and allow to use settings.exists on RPi Zero.

@pelikhan pelikhan merged commit 6383702 into microsoft:master May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants