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 crashes when some external APIs fail #96

Merged
merged 3 commits into from
Mar 4, 2018
Merged

Fix crashes when some external APIs fail #96

merged 3 commits into from
Mar 4, 2018

Conversation

ZhouyangJia
Copy link
Contributor

Hi,

I'm a PhD student. I analyzed the w3m source code and found some potential API bugs that may cause crashes.

These crashes are mainly caused by insufficient error handling of API functions like fopen or chdir.

I think it's unsafe to assume the library function would be correct. It would be better if we could handle the error properly.

Best,
Zhouyang

When chdir fails, print error message and exit.
Check the return value of fopen, and add proper error handling code.
Check the return code of fopen, and return when it fails.
@tats tats merged commit 4f2be7d into tats:master Mar 4, 2018
@tats
Copy link
Owner

tats commented Mar 4, 2018

Merged, 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

Successfully merging this pull request may close these issues.

None yet

2 participants