Fix crash in validateaddress with -disablewallet #6970

Merged
merged 1 commit into from Nov 9, 2015

Conversation

Projects
None yet
8 participants
@laanwj
Member

laanwj commented Nov 9, 2015

Fix a null pointer dereference in validateaddress with -disablewallet. Also add a regression testcase.

Problem reported here: #6963 (comment)

I think this needs to be backported to 0.11 as well.

Fix crash in validateaddress with -disablewallet
Fix a null pointer dereference in validateaddress with -disablewallet. Also add a regression testcase.
@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 9, 2015

Member

Nice catch! I was also looking for the NULL pointer access... we need to be careful by always keeping in mind: #ifdef ENABLE_WALLET != pwalletMain available.

Member

jonasschnelli commented Nov 9, 2015

Nice catch! I was also looking for the NULL pointer access... we need to be careful by always keeping in mind: #ifdef ENABLE_WALLET != pwalletMain available.

@jonasschnelli

This comment has been minimized.

Show comment
Hide comment
@jonasschnelli

jonasschnelli Nov 9, 2015

Member

utACK

Member

jonasschnelli commented Nov 9, 2015

utACK

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Nov 9, 2015

Contributor

ACK
Checked other instances, OK.

Contributor

paveljanik commented Nov 9, 2015

ACK
Checked other instances, OK.

@dcousens

This comment has been minimized.

Show comment
Hide comment
@dcousens

dcousens Nov 9, 2015

Contributor

utACK

Contributor

dcousens commented Nov 9, 2015

utACK

@fanquake

This comment has been minimized.

Show comment
Hide comment
@fanquake

fanquake Nov 9, 2015

Member

utACK

On Monday, November 9, 2015, Daniel Cousens notifications@github.com
wrote:

utACK


Reply to this email directly or view it on GitHub
#6970 (comment).

Member

fanquake commented Nov 9, 2015

utACK

On Monday, November 9, 2015, Daniel Cousens notifications@github.com
wrote:

utACK


Reply to this email directly or view it on GitHub
#6970 (comment).

@MarcoFalke

This comment has been minimized.

Show comment
Hide comment
@MarcoFalke

MarcoFalke Nov 9, 2015

Member

backported to 0.11

yes and utACK.

Member

MarcoFalke commented Nov 9, 2015

backported to 0.11

yes and utACK.

@laanwj laanwj merged commit 2980a18 into bitcoin:master Nov 9, 2015

1 check passed

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

laanwj added a commit that referenced this pull request Nov 9, 2015

Merge pull request #6970
2980a18 Fix crash in validateaddress with -disablewallet (Wladimir J. van der Laan)
@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Nov 9, 2015

Member

Good news: the issue doesn't exist in 0.11 (and hence not in any released version)

This problem was introduced in 506bae3 (#6262) by @dexX7 . The code used to check for ISMINE_*, which can only be ISMINE_NO if there is no wallet, but that check was removed there.

Member

laanwj commented Nov 9, 2015

Good news: the issue doesn't exist in 0.11 (and hence not in any released version)

This problem was introduced in 506bae3 (#6262) by @dexX7 . The code used to check for ISMINE_*, which can only be ISMINE_NO if there is no wallet, but that check was removed there.

@jgarzik

This comment has been minimized.

Show comment
Hide comment
@jgarzik

jgarzik Nov 9, 2015

Contributor

ut ACK

Contributor

jgarzik commented Nov 9, 2015

ut ACK

@jlopp

This comment has been minimized.

Show comment
Hide comment
@jlopp

jlopp Nov 9, 2015

Contributor

Thanks for the quick fix!

Contributor

jlopp commented Nov 9, 2015

Thanks for the quick fix!

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Nov 9, 2015

Member

@jlopp Did it fix your issue? (I still don't see how this can cause a SIGILL in OpenSSL)

Member

laanwj commented Nov 9, 2015

@jlopp Did it fix your issue? (I still don't see how this can cause a SIGILL in OpenSSL)

@jlopp

This comment has been minimized.

Show comment
Hide comment
@jlopp

jlopp Nov 9, 2015

Contributor

@laanwj Yes, I confirmed that my node no longer crashes after issuing the validateaddress command. As for the other errors I had posted in my comments, those were errors that the debugger was throwing immediately upon trying to run bitcoind, not upon calling validateaddress.

Contributor

jlopp commented Nov 9, 2015

@laanwj Yes, I confirmed that my node no longer crashes after issuing the validateaddress command. As for the other errors I had posted in my comments, those were errors that the debugger was throwing immediately upon trying to run bitcoind, not upon calling validateaddress.

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Nov 18, 2015

luke-jr added a commit to luke-jr/bitcoin that referenced this pull request Dec 8, 2015

@crowning- crowning- referenced this pull request in dashpay/dash Feb 14, 2016

Closed

Fix crash in validateaddress with -disablewallet #696

@daira daira referenced this pull request in zcash/zcash Feb 26, 2017

Merged

Bitcoin 0.12 RPC PRs 1 #2100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment