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

Plugin manager crash #51

Closed
tgotic opened this issue Mar 24, 2017 · 4 comments
Closed

Plugin manager crash #51

tgotic opened this issue Mar 24, 2017 · 4 comments

Comments

@tgotic
Copy link

tgotic commented Mar 24, 2017

Plugin manager crashes if cannot save downloaded file.
Please find attached patch file to fix this issue.
libinstall.patch.txt

@chcg
Copy link
Collaborator

chcg commented Mar 28, 2017

Issues addressed by the patch:

  • Missing file pointer return value check
  • Unchecked decrements on unsigned aka size_t vars with risk of wrap around

@chcg
Copy link
Collaborator

chcg commented Apr 2, 2017

@tgotic Do you have an example which plugin download triggers this code path in DirectLinkSearch.cpp?

chcg added a commit that referenced this issue Apr 2, 2017
- modified additionally DirectLinkSearch::findChar() to avoid warparound with unsigned size_t
- used _tfopen_s() instead of just _tfopen
- removed trailing whitespaces
chcg added a commit that referenced this issue Apr 2, 2017
- modified additionally DirectLinkSearch::findChar() to avoid warparound with unsigned size_t
- used _tfopen_s() instead of just _tfopen
- removed trailing whitespaces
@chcg
Copy link
Collaborator

chcg commented Apr 9, 2017

According to dave the DirectLinkSearch stuff was used for sourceforge in the past, but is currently not used any more, so couldn't be tested in real life right now. I tested it with the debugger as far as possible, but I'm not completely sure no further issues are hidden there.

@chcg
Copy link
Collaborator

chcg commented Apr 10, 2017

@chcg chcg closed this as completed Apr 10, 2017
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