Cast to correct data type to avoid memory corruption#1742
Merged
keneanung merged 5 commits intoMudlet:developmentfrom Jun 7, 2018
Merged
Cast to correct data type to avoid memory corruption#1742keneanung merged 5 commits intoMudlet:developmentfrom
keneanung merged 5 commits intoMudlet:developmentfrom
Conversation
Member
|
Could you enable the Qt 5.9 build here for testing? |
Member
Author
|
Done |
vadi2
approved these changes
Jun 7, 2018
Member
vadi2
left a comment
There was a problem hiding this comment.
Seems to work! 🎉 thanks for pinning down this difficult issue 😄
We only build one Qt version, so the condition is unnecessary.
Member
|
Just to check - what is the earliest Qt version that we are to support - and do we still test against it? |
Member
|
At the moment, it is 5.6, and yes Travis checks builds against it. We can use 5.9 features just fine now because official Windows binary uses 5.9, macOS uses 5.11, and Linux uses 5.9. |
Member
|
Just #ifdef Qt 5.9 things for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief overview of PR changes/additions
This fixes a memory corruption on Windows when compiling Mudlet with MinGW 5.3. It might have been a problem on other platforms as well, but it became apparent on Windows with #1176. The memory corruption is triggered in the linked issue by denying the telnet subnegotiation for ATCP. The cast from
chartointlead to a change at a negative index in a bool array which happened to modify the internal state ofzlibwhich in turn lead to a segfault or faulty state (which stalled).Motivation for adding to Mudlet
We can switch to an updated Qt version on Windows!
Other info (issues closed, discussion etc)
Fixes #1176