Auto merge of #2526 - bitcartel:2480_segfault_zeroconf_from_zaddr, r=daira
authorHomu <sysadmin@z.cash>
Fri, 28 Jul 2017 05:42:59 +0000 (22:42 -0700)
committerHomu <sysadmin@z.cash>
Fri, 28 Jul 2017 05:42:59 +0000 (22:42 -0700)
commitd6e6f51724d8075baf221d5fd744e1f0e4603782
tree311af239ead4632a5c01799f852e5ffb4f24cde4
parente88ab1a9207a46e1f0ba00563ddb5f25e9b5c438
parent9b5da42745431272120c00dd1a20d75707447e85
Auto merge of #2526 - bitcartel:2480_segfault_zeroconf_from_zaddr, r=daira

Fixes #2480 where missing map entry would cause a segfault.

`wtxHeight = mapBlockIndex[wtx.hashBlock]->nHeight;` results in undefined behaviour when the block hash is not present in the map, returning a null value which is dereferenced via `->nHeight`.  This error is triggered by a zero-conf wallet transaction which has not been mined yet.  As discussed in #2480, on some systems there is a segfault whilst on others there is a silent exit.  This makes it difficult to write a test, but the fix has been tested empirically to confirm an exception is thrown.  This PR fixes the segfault and complements #2525 which prevents a user from sending from a zaddr with minconf 0.
src/wallet/asyncrpcoperation_sendmany.cpp
This page took 0.024183 seconds and 4 git commands to generate.