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

Segfaults when decodeFile throws "file not found" #5

Closed
eagletmt opened this issue Dec 7, 2011 · 2 comments
Closed

Segfaults when decodeFile throws "file not found" #5

eagletmt opened this issue Dec 7, 2011 · 2 comments

Comments

@eagletmt
Copy link

eagletmt commented Dec 7, 2011

Even if decodeFile fails to open a file, fclose is called via addForeignPtrFinalizerEnv, thus segfaults.

Possible fixes:

  • Add NULL-check just before fclose in fclose_helper
  • Do addForeignPtrFinalizerEnv just after NULL-check
@snoyberg
Copy link
Owner

snoyberg commented Dec 8, 2011

Thanks for the report. I just pushed a commit that should address, can you confirm before I release?

@eagletmt
Copy link
Author

eagletmt commented Dec 8, 2011

I have confirmed it. Thank you.

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

2 participants