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 possible crash with invalid nCustomFeeRadio in QSettings (achow101, TheBlueMatt) #11332

Merged
merged 1 commit into from Sep 15, 2017

Conversation

Projects
None yet
8 participants
@jonasschnelli
Member

jonasschnelli commented Sep 14, 2017

QButtonGroup->button() may return a nullptr.
Accessing the object directly with setChecked seems fragile.

This is a simple fix to ensure to never call a button out of bounds (nullptr).

There are probably other places where a sanity check for QSettings are required.

Found by @achow101.
Code by @TheBlueMatt.

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Sep 14, 2017

Member

Commit message needs to credit @achow101 for finding this :)

Member

laanwj commented Sep 14, 2017

Commit message needs to credit @achow101 for finding this :)

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Sep 14, 2017

Member

Updated with the simpler solution by @TheBlueMatt (from 6ba2214).

Credited @achow101.

Member

jonasschnelli commented Sep 14, 2017

Updated with the simpler solution by @TheBlueMatt (from 6ba2214).

Credited @achow101.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Sep 14, 2017

Member

This is a back-portable short fix and for 0.16 we should consider removing the group entirely (over further overhaul the custom fee settings)

Member

jonasschnelli commented Sep 14, 2017

This is a back-portable short fix and for 0.16 we should consider removing the group entirely (over further overhaul the custom fee settings)

Fix Qt 0.14.2->0.15.0 segfault if "total at least" is selected
A button was removed, so now button(1) is nullptr
@gmaxwell

This comment has been minimized.

Show comment
Hide comment
@gmaxwell

gmaxwell Sep 15, 2017

Member

utACK

Member

gmaxwell commented Sep 15, 2017

utACK

@luke-jr

This comment has been minimized.

Show comment
Hide comment
@luke-jr

luke-jr Sep 15, 2017

Member

utACK

Member

luke-jr commented Sep 15, 2017

utACK

@MeshCollider

This comment has been minimized.

Show comment
Hide comment
@MeshCollider

MeshCollider Sep 15, 2017

Member

utACK

Member

MeshCollider commented Sep 15, 2017

utACK

@achow101

This comment has been minimized.

Show comment
Hide comment
@achow101

achow101 Sep 15, 2017

Member

utACK

Member

achow101 commented Sep 15, 2017

utACK

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke
Member

MarcoFalke commented Sep 15, 2017

utACK cdaf3a1

@MarcoFalke MarcoFalke changed the title from Fix possible crash with invalid nCustomFeeRadio in QSettings to Fix possible crash with invalid nCustomFeeRadio in QSettings (achow101, TheBlueMatt) Sep 15, 2017

@laanwj laanwj merged commit cdaf3a1 into bitcoin:master Sep 15, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Sep 15, 2017

Merge #11332: Fix possible crash with invalid nCustomFeeRadio in QSet…
…tings (achow101, TheBlueMatt)

cdaf3a1 Fix Qt 0.14.2->0.15.0 segfault if "total at least" is selected (Matt Corallo)

Pull request description:

  `QButtonGroup->button()` may return a nullptr.
  Accessing the object directly with `setChecked` seems fragile.

  This is a simple fix to ensure to never call a button out of bounds (nullptr).

  There are probably other places where a sanity check for `QSettings` are required.

  Found by @achow101.
  Code by @TheBlueMatt.

Tree-SHA512: a1b5d6636382a4e20c4e66ef82de19e6daa8b1b5f21b0f2bc5f51cfb6b37797045c7e29ebead8088ee2b990ed12c549c217cae6aad7566319599d086d526f6dc

laanwj added a commit that referenced this pull request Sep 15, 2017

Fix Qt 0.14.2->0.15.0 segfault if "total at least" is selected
A button was removed, so now button(1) is nullptr

Github-Pull: #11332
Rebased-From: cdaf3a1
Tree-SHA512: 0a49bf4e9ab08e5869170c8a212da60c9a6b90c36427d788de384aa4be6d87bb5e00a21edf78eed34f81bbc554b6f15565bb9b493dafcbfe9d6f4664d7424d9d

laanwj added a commit that referenced this pull request Sep 20, 2017

Merge #11334: qt: Remove custom fee radio group and remove nCustomFee…
…Radio setting

e53fa4a Remove custom fee radio group (Andrew Chow)

Pull request description:

  Removes the extraneous custom fee radio group and its single radio button. The radio button is replaced with a label that has the radio button's text.

  Continuation of #11332

Tree-SHA512: b47b675f900ee4e2f4823203a42bb697f707ba67a8504d730c53d4dae511d0ed03226af34efd7ea45570c6111f8b3b6c39ac28f1b5c090de225903442ad4159a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment