Browse Source
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.pull/4/head
![sysadmin@z.cash](/assets/img/avatar_default.png)
1 changed files with 4 additions and 0 deletions
Loading…
Reference in new issue